I am new to creating Model-Driven PowerApps leveraging the Dataverse. I am having difficulty with things that should be straight forward such as creating Choice fields.
1.) Entering Values for choice fields.
The 'Value' of choice fields is numerical and autogenerated; the Display Name is the value I want to capture. Is this by design because the tutorials I looked at didn't have the Value feature. Also, will entering a value in the 'External Value' make a difference.
2.) Choice() Function in PowerApps Canvas App
The above poses a problem as when trying to use these fields in a Canvas App (or custom page in Model Driven apps) such as an input form. When trying to use the Choices() function, the Values pulled in are the numerical value. Is there any way around that?
Hello, @illmatic_one , have you tried to use Choices(TableName.'ChoiceColumnName)?
Regards,
Ahmed
If my reply helped you, please give a 👍. And if it has solved your issue, please consider a 👍 & Accepting it as the Solution to help other members of the community find it more.
My Blog: www.powerplatformplace.com
Yes, that's the normal Choices function syntax and how I discovered the aforementioned issue.
@illmatic_one , You are the second person to say that this week. The other post was about Datavers for teams. Go to your Solutions > Default Solution and Publish all Costomization.
I think we need to get to the bottom of this Choice Function issue.
Regards,
Ahmed
If my reply helped you, please give a 👍. And if it has solved your issue, please consider a 👍 & Accepting it as the Solution to help other members of the community find it more.
My Blog: www.powerplatformplace.com
1. Choice fields in dataverse have always had a Display Name and a value , may be it wasn't leveraged through the new UI but was always there in the classic interface, for External value it is used if the column is used with virtual tables.
If you need more info about this: https://docs.microsoft.com/en-gb/power-apps/maker/data-platform/create-edit-virtual-entities#create-...
2. For the next question I will reproduce at my end and will let you know.
I have tried to reproduce on my side , so lets say i have a table called Visits and created a choice Sites
I just added it on my canvas screen on a form and here how it looks like, I added through Add Fields on the form
And it is showing the Display Name correctly
I also tried to add a dropdown and I have linked it the same way and it is working, can you try just use Choices(Sites) ? Sites of course your choice column name
Hi there,
Sorry, I did not include that in this option I wanted to use a Radio Button instead of a dropdown. In a normal Canvas App connected to a SharePoint list, you can delete the dropdown field, rename it to DataCardValue3 and then for the Items property of the Radio button, you would use the Choices() formula with the Datasource.ColumnName. And doing this only brings in the numerical Value, not the 'display'. Also, in any of the video tutorials I looked at when ensuring I create my custom choices [and name the custom choice field NameChoices], I didn't see where they entered the custom choice 'display' and that the Dataverse set the numerical value itself. This is what led to my confusion.
I tried your same approach deleted the Dropdown , added a radio and renamed it to DataCardValue4 and it worked , can you please try the same?
hey there, thank you for this. I noticed quite a few differences here that maybe I should have mentioned. So:
- It's a Yes/No choice field, not a regular choice. The labels have been changed from "yes" and "no," to something more specific for the question.
- This is a 'custom page' in a model driven app that uses the Canvas App interface but is not exactly a canvas app and in such, I don't have the same options.
- Instead of 'Radio Button' I have a 'Radio Group'
When doing the method above, what happens is that no Items show next to the Radio buttons, and if you click on the table rendered by the Choices formula, the Values listed shows an error that says: This data type is unsupported for evaluation
@illmatic_one and @Mira_Ghaly , the other post that I mentioned was resolved. Check it out
User | Count |
---|---|
19 | |
9 | |
8 | |
5 | |
5 |
User | Count |
---|---|
32 | |
29 | |
18 | |
18 | |
6 |