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

Community site session details

Session Id : PSqfrt51EDqucU5E5ctEhC
Power Automate - Building Flows
Unanswered

How to handle option sets in Power Automate?

Like (0) ShareShare
ReportReport
Posted on 7 Oct 2021 19:17:04 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!

I have the same question (0)
  • Expiscornovus Profile Picture
    32,253 Most Valuable Professional on 08 Oct 2021 at 10:35:51
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 854 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 525 Moderator

#3
trice602 Profile Picture

trice602 318 Super User 2025 Season 2

Last 30 days Overall leaderboard
Loading complete