Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

How to handle option sets in Power Automate?

(0) ShareShare
ReportReport
Posted on by

Hello!

 

I have a scenario: Virtual agent sends text to Power Automate (receive it as input) and there I would like to create a new record in Dataverse with filled out Option set. I tested and it doesnt recognize texts but you need to push ID there. I wonder how to say Text A = 100000, Text B = 100001, etc. I was wondering to go with conditions (yes, no) and then drill down but what if there are like 10 values available so it will be really too much IF statements to cover all. If I dont mention what if we get two or more Option sets as inputs from Virtual agent. 

 

Please advise!

  • Expiscornovus Profile Picture
    32,131 Most Valuable Professional on at
    Re: How to handle option sets in Power Automate?

    Hi @mimocnik,

     

    One approach could be to embed an array with the labels and ids in your flow. You can use a filter array to get the correct id and use an expression in the add row action.

     

    Below is an example of that approach. 

    Drawback of this approach is that you need to maintain the optionset values in your flow. Alternatively, you could dynamically retrieve the optionset values via an HTTP action instead of the initialize variable action.

     

    1. Add an Initialize variable of type array. 

     

    2. Add a Filter Array. Filter the array on the label field value.

    addresstype_array.png

    3. Use an expression to retrieve the correct id of the corresponding label:

     

     

    body('Filter_array')[0]['Value']

     

     

     

    addresstype_array02.png

     

    Hope this helps a bit? 

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1