Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Unanswered

Adding options to a blank optionset with powerautomate

(0) ShareShare
ReportReport
Posted on by 2

Hey everyone,

 

I am looking for a way to add options to a blank optionset within powerautomate.

My goal is to be able to work with these added values in powerapps.

I am getting the data from a http request out of Business Central.

Flow updates perfectly all wanted fields in my entity except I dont know how to add an option from the http output to a optionset.

 

Thank you very much upfront for your help! 🙂

  • ghost6000 Profile Picture
    2 on at
    Re: Adding options to a blank optionset with powerautomate

    Thanks for your help so far guys! I will specify a Little more what I am trying to do and will come back to this Post later.

  • v-xida-msft Profile Picture
    on at
    Re: Adding options to a blank optionset with powerautomate

    Hi   @ghost6000 ,

    Could you please share a bit more about your scenario?

    Do you want to add a option from a HTTP Response to the Option Set Type of your CDS Entity?

     

    Actually, the Option Set type field is essentially a Object type in CDS Entity, it contains Label and Value attribute. The Label attribute is used to store the Text value, e.g. "Pending". The Value attribute is used to store the Integer value, e.g. 

    886370001. The screenshot as below:
    5.JPG

     

    Actually, when you selected an option (Label value) for the Option Set field within your Power Automate flow, it uses the Integer value to store the Option Set field:
    6.JPG

     

    7.JPG

     

      
    So if you want to type a custom value within the Option Set field of the "Create a new record" action, you should type integer value (e.g. 886370001) rather than Label value.
    In addition, the option you want to set to the Option Set field must be existed as available options of this Option Set field already, you could not assign a custom option to this option set field.
     
    Actually, when you create new Option Set in your CDS Entity, you could custom Integer value for each option as below:
    8.JPG

    After that, you could assign different integer value to this Option Set field based on the retrieved option from your HTTP Output.

    9.JPG

     

    Within the Option Set field, type the following sample formula:

    if( equals(body('HTTP')?['option'], 'Option1'), 1, if( equals(body('HTTP')?['option'], 'Option2'), 2, 3 ) 

     

    Best regards,
  • EricRegnier Profile Picture
    8,714 Most Valuable Professional on at
    Re: Adding options to a blank optionset with powerautomate

    Hi @ghost6000,

    By "adding an option", do you mean a new item in your optionset available values (metadata) or updating an entity field of datatype optionset? If updating an entity, Power Automate using the CDS Web API for its transactions, and so you need to assign the int value of the optionset item to update or set null to associate a blank value.  

    Hope this helps

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Microsoft Dataverse

#1
stampcoin Profile Picture

stampcoin 17

#2
mmbr1606 Profile Picture

mmbr1606 15 Super User 2025 Season 1

#3
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

Overall leaderboard

Featured topics