Display more fields in EntityComboBox

Hi, I used an EntityComboBox to select a referenced entity.
Everything worked well, but the dropdown list only displays the first attribute of the searched entity. How can I select more attributes?
I tried inserting a fetchPlan, but without no results:

        <entityComboBox id="iniziativaField" property="iniziativa"
                        
                        optionsContainer="iniziativasDc">
            <actions>
                <action id="lookup" type="entity_lookup"/>
                <action id="clear" type="entity_clear"/>
            </actions>
        </entityComboBox>

Here is the fragment in the data section:

<collection id="iniziativasDc" class="net.mcoletti.guimh.entity.Iniziativa">
<fetchPlan >
    <property name="codIniziativa" />
    <property name="descrizioneIniziativa" />
</fetchPlan>
<loader id="iniziativasDl">
    <query>
        <![CDATA[select e from guim_Iniziativa e]]>
    </query>
</loader>

entityComboBox displays the InstanceName of the entity to the user.
You can map any entity fields to InstanceName.

1 Like

Also, EntityComboBox has an OptionCaptionProvider extension point:
https://docs.jmix.io/jmix/backoffice-ui/vcl/api.html#option-caption-provider

Thanks Alexander; I was able to obtain the proper description with a getter method, combining several attributes of the Instance. In this way, the description will be consistent in all the screens.

I will also study the extension point.

Massimo