cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JohnP
Kudo Kingpin
Kudo Kingpin

Inconsistent behaviour with Combobox and CDS lookup fields

Comboboxes connected to CDS lookup fields sometimes work and sometimes not, take a look at this pic:

cds_blank.jpg

The "Owner" Combobox works fine when selecting and submitting the form. The "areas" comboboxes does not work. I can select values and the changes are saved to the entity with SubmitForm. However, the comboboxes turns blank after submitting. The exact same "areas" comboboxes works fine in another form! I see no logic as the comboboxes are defined exactly the same across the app:

cds_blank2.jpg

Changing the "DefaultSelectedItems" to "ThisItem.crc09_MainAreaLookup" instead of "Parent.Default" makes it work temporarily, but the next time the app is run it's blank again.

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @JohnP ,

Based on the issue that you mentioned, I have made a test, and the issue is confirmed on my side. I afraid that the Parent.Default formula would not work within the DefaultSelectedItems property of the LookUp filed ComboBox within a Edit form which connects to CDS Entity.

 

As an alternative solution, please consider set the DefaultSelectedItems property of the LookUp filed ComboBox to following:

ThisItem.'LookUp Field'

On your side, you may type:

ThisItem.'MainAreaLookUp'

Note: The ThisItem.'LookUp Field' formula works well on my side without issue.

 

In addition, please also take a try with the following workaround:

set the DefaultSelectedItems property of the LookUp filed ComboBox in your Edit form to following:

LookUp(ReferencedEntity, 'Unique Identifier Column' = ThisItem.'MainAreaLookUp'.'Unique Identifier Column')

Note: The ReferencedEntity represents the Entity your MainAreaLookUp field reference records from, you need to add the ReferencedEntity as data source into your app firstly. The 'Unique Identifier Column' column represents the 'Unique Identifier' column in your CDS Entity.

 

If you want to get further help in this issue, please submit an assisted support ticket through the following link:
https://powerapps.microsoft.com/en-us/support/pro

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-xida-msft
Community Support
Community Support

Hi @JohnP ,

Based on the issue that you mentioned, I have made a test, and the issue is confirmed on my side. I afraid that the Parent.Default formula would not work within the DefaultSelectedItems property of the LookUp filed ComboBox within a Edit form which connects to CDS Entity.

 

As an alternative solution, please consider set the DefaultSelectedItems property of the LookUp filed ComboBox to following:

ThisItem.'LookUp Field'

On your side, you may type:

ThisItem.'MainAreaLookUp'

Note: The ThisItem.'LookUp Field' formula works well on my side without issue.

 

In addition, please also take a try with the following workaround:

set the DefaultSelectedItems property of the LookUp filed ComboBox in your Edit form to following:

LookUp(ReferencedEntity, 'Unique Identifier Column' = ThisItem.'MainAreaLookUp'.'Unique Identifier Column')

Note: The ReferencedEntity represents the Entity your MainAreaLookUp field reference records from, you need to add the ReferencedEntity as data source into your app firstly. The 'Unique Identifier Column' column represents the 'Unique Identifier' column in your CDS Entity.

 

If you want to get further help in this issue, please submit an assisted support ticket through the following link:
https://powerapps.microsoft.com/en-us/support/pro

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (14,749)