cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Apps4Power
Frequent Visitor

DropDown from a lookup field related to anothe CDS entity does not show default value.

we are currently building a canvas app. 

 

The app uses two entities that are related.

 

Entity 'Tests' contains fields:

Test

TestObject (lookup from entity Objects)

 

and relations

Testobject (many-to-one); many tests to one object.

 

Entity 'Objects' contains fields:

Objectname

 

and relations:

Test object, related entity 'Tests', one-to-many

 

When a form is created from Tests, all values are ok, except the value for Testobject. This box appears empty, but when a item is selected and saved it DOES save correctly.

 

We seem to not manage to fix the first appearace of the DropDown box containing the TestObject.

 

Can anyone point us in the correct direction?

 

Kind regards,

 

Michel

1 ACCEPTED SOLUTION

Accepted Solutions

I have found why this did not work. Forgot to feedback into this commmunity.

 

The form Item of the Objects form was galleryx.selected that has source Objects. In order for the drowdown Testobject to work, it seems to neccessary to already lookup the testobject in the gallery (thus a label in the gallery) in order to show appropriately in the form.

 

View solution in original post

5 REPLIES 5
v-yutliu-msft
Community Support
Community Support

Hi @Apps4Power ,

Do you want to use a drop down to update and display a lookup field of CDS?

Actually, I do not quite recommend you use drop down for a lookup field, which need more custom settings.

Using combo box will be better.

1)If you use drop down, you need to set like this:

drop down's Items:

Choices(Tests.TestObject).Name

drop down's Default:

ThisItem.TestObject.Name

this datacard's Update:

LookUp(Objects,Name=Dropdownname.Selected.Name)

2)If you use combo box, you need to set like this:

combo box's Items:

Choices(Tests.TestObject)

combo box's DefaultSelectedItems:

ThisItem.TestObject

datacard's Update:

comboboxname.Selected

 

 

Best regards, 

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

thanks for your help!

 

I have configured a combobax as you described. it still does not populate the field properly by default.

 

then I have tried do delete the datacard and add it again as a datacard. still no success.

 

In my test environment i created two tables with a similar relationship. Built an app to test. There it works as expected.

 

any other suggestion on how i can proceed to get it working in my prod environment?

 

Hi @Apps4Power ,

So do you mean that you design exactly the same two apps in two environments, one works good, one not work?

That's really strange...

I suggest you open a ticket here:
https://powerapps.microsoft.com/en-us/support/

 

Best regards,

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

I re-created this part of the app's functionality in a test environment. in the test invironment it works flawless. in my prod environment it does not.

 

could there be any sort of conflict with other functionality?

I have found why this did not work. Forgot to feedback into this commmunity.

 

The form Item of the Objects form was galleryx.selected that has source Objects. In order for the drowdown Testobject to work, it seems to neccessary to already lookup the testobject in the gallery (thus a label in the gallery) in order to show appropriately in the form.

 

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

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,679)