cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
illmatic_one
Helper II
Helper II

Dataverse - Choice Field & Model Driven Apps

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? 

 

11 REPLIES 11
AhmedSalih
Super User
Super User

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

 

Mira_Ghaly
Dual Super User
Dual Super User

@illmatic_one 

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.

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

@illmatic_one 

I have tried to reproduce on my side , so lets say i have a table called Visits and created  a choice Sites

Mira_Ghaly_0-1660953547290.png

 

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

Mira_Ghaly_1-1660953622061.png

 

And it is showing the Display Name correctly 

Mira_Ghaly_2-1660953816866.png

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

 

 

 

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

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.

@illmatic_one 

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?

 

Mira_Ghaly_0-1660958457396.png

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

@Mira_Ghaly 

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

AhmedSalih
Super User
Super User

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Users online (4,863)