cancel
Showing results for 
Search instead for 
Did you mean: 

ComboBox duplicating one record; not displaying another record.

former_member592761
Discoverer
0 Kudos

Hello All,

I've got a ComboBox bound to an OData model. When I execute the OData service, it returns two unique records. And I can see both of these records in the $batch response while debugging in Chrome.

However, the ComboBox dropdown only contains one of the records ... and displays it twice!

Here's the view's code:

<Label text="{i18n>orgUnit}" required='true'/>

<ComboBox
id="objid"
showSecondaryValues="true"
items="{ path: '/OrgUnitSearchSet' }"
change="onObjectIdChange">
<core:ListItem
key="{Objid}"
text="{Objid}"
additionalText="{Desc}"/>
</ComboBox>


Anybody have this issue, or have any suggestions?

Thanks,

Matt


Accepted Solutions (1)

Accepted Solutions (1)

former_member592761
Discoverer
0 Kudos

This issue has been solved.

Just in case anyone else has duplicating content in a combobox ... the problem was my key in the OData service. I was using a fake value which I wasn't even populating to bypass the mapping requirements. I didn't need a key since it was read-only for the entire dataset, but apparently UI5 does need it.

I just populated sy-tabix into the key and now both records are displaying fine. 🙂

Matt

Answers (0)