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
Solved! Go to Solution.
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.
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,
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,
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.