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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get Dataverse Choices ...
Power Automate
Unanswered

Get Dataverse Choices with Label and ID(Value)

(0) ShareShare
ReportReport
Posted on by 30

Hey Guys,

 

Im trying to get from Dataverse a choice list. I want to get the choices to put them in an adaptive Card.

JanPh_0-1652105579029.png

Unforunately powerautomate (In powerapps) is not showing me any option to select them.

Has somebody an idea?

 

Regards Jan

Categories:
I have the same question (0)
  • Ellis Karim Profile Picture
    11,994 Super User 2026 Season 1 on at

    I don't work much with Datavse, but I had an "old" flow that I wrote to get the Option set text and value as a JSON object. You should be able to modify it to suit your needs. It produces the following object:

    {
     "Apple": 544500000,
     "Pear": 544500001,
     "Banana": 544500002,
     "Mango": 544500003
    }

    If you specify a property, it will return the option set value:

    outputs('Compose_Mapped_Table_2')?['Apple'] ---> 544500000
    outputs('Compose_Mapped_Table_2')?['Mango'] ---> 544500001
    outputs('Compose_Mapped_Table_2')?['Banana']---> 544500002
    outputs('Compose_Mapped_Table_2')?['Pear'] ---> 544500003

     

    Snag_3eadb62.png

     

    ekarim2020_0-1652110800474.png

    Snag_3d3b135.png

    /api/data/v9.1/GlobalOptionSetDefinitions(Name='crc37_fruitchoice')

    Snag_3d65192.png

    "UserLocalizedLabel": item()['Label']['UserLocalizedLabel']['Label']
    "Value": item()?['Value']

    Select Value 2 produces:

    [
     {
     "UserLocalizedLabel": "Apple",
     "Value": 544500000
     },
     {
     "UserLocalizedLabel": "Pear",
     "Value": 544500001
     },
     {
     "UserLocalizedLabel": "Banana",
     "Value": 544500002
     },
     {
     "UserLocalizedLabel": "Mango",
     "Value": 544500003
     }
    ]

     

    Snag_3dbe994.png

    item()?['UserLocalizedLabel'] 
    item()?['Value']

    The Select Value 2 produces:

    [
     {
     "Apple": 544500000
     },
     {
     "Pear": 544500001
     },
     {
     "Banana": 544500002
     },
     {
     "Mango": 544500003
     }
    ]

     

    Snag_3de6ff0.png

    json(replace(replace(replace(string(body('Select_Key_Value_Pairs_2')),'[',''),']',''),'},{',','))

    The expression converts the previous output into a JSON object:

    {
     "Apple": 544500000,
     "Pear": 544500001,
     "Banana": 544500002,
     "Mango": 544500003
    }

    There is also another method that uses the String Maps Table.

     

    Hope this helps.

     

    Ellis

  • Jan-Ph Profile Picture
    30 on at

    Hmm okeay not i need it get queried otherwise its to much effort to change it in every Flow manually. Is this task easier done with lists ?

  • Ellis Karim Profile Picture
    11,994 Super User 2026 Season 1 on at

    It depends on what you need or how you want to use the option sets. 

     

    A manual way to get the values and then hardcode them into the flow/app:

    Snag_7631aec.png

    Snag_7642db4.png

    For each choice field value, select View more to display the option set value:

     

    Snag_764fbf1.png

    Unfortunately the option set value is displayed with commas:

    Snag_7618e03.png

     

    Hope this helps.


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 605

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard