Hi All,
i have implemented cascaded dropdowns with lookup fields as below-
1. field-A - sharepoint lookup field
2. field-B - sharepoint lookup field
field-A and field-B both are coming from a lookup list say lookupAB.
In power app- created dropdown controls rather than using field-A and field-B comboboxes.
1. ddlfieldA
2. ddfieldB
cascaded feature is implemented and working fine on new and edit forms in power app.
Issue-
when i goes to edit item, NO selection found. i can see saved value in sharepoint list but its not showing as default selected in edit form.
can someone please suggest what could be possible fix to populate default values in ddfieldA drop down OR its not possible due to cascaded.
please help.
Thanks
Amod
Solved! Go to Solution.
Hi @amodtiwari,
Set the Default property of the ddlfieldA as below:
ThisItem.FieldA.Value
Set the Default property of the ddfieldB as below:
LookUp(CollookupAB,Title=ddlfieldA.SelectedText.Value).field-B
Hi @amodtiwari,
Do you want to set the default selected value for the ddfieldA?
Could you please tell me that how you set the Items of the ddfieldA and ddfieldB?(IMPORTANT)
If you want the dropdown display the default value when you edit an existing record, you should set the Default property of the Dropdown based on the Items property you set for it.
I have a test on my side, please take a try as below.
I have 2 LookUp fields, FieldA and FieldB in my Product list which retrieves values from the lookupAB containing 2 text columns named AColumn and BColumn.
1). Set the Items property of the ddlfieldA as below:
Choices([@Product].FieldA)
Set the Default property of the ddlfieldA as below:
ThisItem.FieldA.Value
Set the AllowEmptySelection property of the ddlfieldA as true
2). Set the Items property of the ddlfieldB as below:
Choices([@Product].FieldB)
Set the Default property of the ddlfieldB as below:
LookUp(lookupAB,AColumn=Dropdown3.Selected.Value).BColumn // Dropdown3 represents the Dropdown corresponding to FieldA
Set the AllowEmptySelection property of the ddlfieldB as true
Hi,
Thanks to looking into case, i am using collection to get values under these two lookups -
Items properties-
1. ddlfieldA - Distinct(CollookupAB,Title)
2. ddfieldB - Distinct(Filter(CollookupAB, Title = ddlfieldA .SelectedText.Value), field-B)
it working for cascaded feature but the problem is to set default value of ddlfieldA on edit form.
please let me know in case of any query.
Thanks
Amod
Hi @amodtiwari,
Set the Default property of the ddlfieldA as below:
ThisItem.FieldA.Value
Set the Default property of the ddfieldB as below:
LookUp(CollookupAB,Title=ddlfieldA.SelectedText.Value).field-B
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
252 | |
124 | |
85 | |
84 | |
67 |