Showing results for 
Search instead for 
Did you mean: 
New Member

How to handle option sets in Power Automate?



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!

Dual Super User
Dual Super User

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.


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









Hope this helps a bit? 

Helpful resources

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (2,993)