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 Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (37,366)