web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Choices column in Data...
Power Apps
Answered

Choices column in Dataverse

(0) ShareShare
ReportReport
Posted on by 249

Hello Power users

 

I have a concern about choices column in dataverse and choices function

So I have a table "Player", in this table i have a column "drug test result" which is of type "Choice" with 3 choices

So i created a form for new player and i have a text input box drug test which has a function 

Choices(Players.'Drug Test Result')

edit formedit form

why when i use patch i have to write 'Drug Test Result':drugtestdp.Selected.Value, and not just 'Drug Test Result':drugtestdp.Selected

whereas if i use in my items as just table name "Player", then in my patch i will have to write 'Drug Test Result':drugtestdp.Selected.'Drug Test Result'

drug test column.png

Thanks in advance, its a bit detail into powerfx but i want to learn it

 

Categories:
I have the same question (0)
  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @chahineatallah1,

     

    There is a difference between using Choices(Players.'Drug Test Result') and displaying the 'Drug Test Result' column by using Players as the Items property.

     

    The first option will display all unique choice options of your 'Drug Test Result'. Another option would be using the actual Choice List name of the choice list linked to that column. Choices(ChoiceListName). 

     

    Using Players as the Items property will simply load in the rows of your table from which you only display the Drug Test Column. In other words, you get to see the entered results, not the unique choices for that column. Should you have 5 rows with the value 'Passed', then you will see 'Passed' 5 times in that dropdown. Since you load in all rows, you have to define the column when using the Patch function. Dropdown.Selected.ColumnName

     

    When using the dropdown to display the unique choice list values, option 1 is the way to go. Either by using Choices(TableName.ChoiceColumnName) or Choices(ChoiceListName). Referencing the dropdown value will be done by using Dropdown.Selected.Value

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • chahineatallah1 Profile Picture
    249 on at

    Hi Lauren

    Thanks for Reply

    One more tricky question, i have a report form, and in this report table there is player column which is a lookup type to player table mentioned above

    so now in my report form when i put the player column in order for the one who is filling the form to select the player, in my submit button for the player , i have to write patch this way playerdropdown.selected without .values or .columnname why here its behaving differently

    edit report.png

    player lookup.png

  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @chahineatallah1,

     

    In this case you would like to link the record via a LookUp column. The LookUp column expects an input of type record - meaning you want to patch the complete selected record within that dropdown. (Dropdown.Selected)

     

    I hope this helps!

  • chahineatallah1 Profile Picture
    249 on at

    Thanks Lauren! 

  • chahineatallah1 Profile Picture
    249 on at

    Hi Lauren

    Am getting this strange error, although i have column name called "Full Name" in my table player, why is that? i tried also to use schema name in choices function but it didn't work

    choices errorchoices errorplayer tableplayer table

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard