I am developing Canvas app on CDS. I have option sets on entities, so when I create Edit Form in Canvas app, PowerAPPs automatically adds mandatory fields on the form. The option sets which are mandatory do not display the options in option sets. It displays a text field instead. But If that option set is not mandatory in CDS, canvas app EDIT form displays all the values in drop down with no Issue.
So to confirm this,
I changed a mandatory option set to Non Mandatory and created a new Edit form. This time on edit form the option set displayed all the options in drop down.
Then I changed back that option set to non mandatory and then created a new edit form, I faced the same issue.
I tried this for both Edit and New form modes Behavior is same.
Solved! Go to Solution.
Do you have a question in how to fix this? If you need to have the dropdown on non-mandatory fields, simply delete the text input control in the data card and replace with a dropdown and use the Choices() expression with the name of the option set for that field.
Hope this helps.
I am unable to recreate your issue. I built a CDS entity called DemoNames and included a mandatory Option Set field called OptSetTest.
When I add a new Edit Form, it just shows up with the primary field (Name) and Created On. I add the OptSetTest field from the fields menu and it shows up properly as a dropdown.
Can I please see a screenshot of your entity in CDS, with the option set field that is acting up?
1. This is my entity and field which is required in CDS
2. I have selected a blank screen in Canvas and then inserted Edit form in it.
3. Selected source(CDS) and entity
4. Mandatory fields automatically added on the form. In image below it has a text field Site Type Value. which is a text field type and mandatory.
5. And also in above snapshot you can see when I open Add fields again I see another field SIte Type. Which is of type Option Set and If I add this on the form it displays all the drop down options. When I save the form it doesnt allow me unless I put numeric value in the Site Type Value text field.
"use the Choices() expression with the name of the option set for that field."
By above you mean to set Drop Down control Items property with my option set field in Choices
as shown in snapshot below?
Hi @AdnanKhan ,
I also follow your steps, but my required option set field works as a combo box in the form properly, I can't reproduce your issue.
What about replacing textinput box to combo box and setting Items property: Choices([@Site].'Site Type')?
Yes, the exact name for your option set will come up with intellisense. This typically depends on if it's a global optionset or tied specifically to that entity field.
Hope this helps,
Check out the News & Announcements to learn more.
Did you know that you can visit the Power Query Forum in Power BI and now Power Apps
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.
DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.