Skip to main content

Notifications

Community site session details

Community site session details

Session Id : WbGy5dfJR9qJFv/5Edbfli
Power Apps - Microsoft Dataverse
Answered

Unable to fill in option set field in dataverse using flow

Like (0) ShareShare
ReportReport
Posted on 26 Mar 2021 07:31:22 by 1

I was trying to create a flow that copy Microsoft Forms response to Dataverse entity. I encountered some trouble when attempting to fill in option set field in Dataverse. For example, in the Forms query there is a field named "Sex" with two options Male/Female. There is also an identical field in Dataverse entity. However, in the flow designer, I could not fill in an option set field with dynamic content I obtained from Forms response. The only way I achieve this seems to be changing the data type of the "Sex" field to text... Is there any way to maintain the field type of "option set" while having the flow work?

Categories:
  • takolota1 Profile Picture
    4,859 Super User 2025 Season 1 on 20 Feb 2022 at 02:10:01
    Re: Unable to fill in option set field in dataverse using flow

    I have to enter possible multiple choice meal time options in to my Dataverse table and I just use the following expression to create my string of numbers matching the choices:

    replace(trim(concat(if(contains(triggerOutputs()?['body/28 - Service Times Offered'],'Breakfast'),'759090000 ',''), if(contains(triggerOutputs()?['body/28 - Service Times Offered'],'Lunch'),'759090001 ',''), if(contains(triggerOutputs()?['body/28 - Service Times Offered'],'Dinner'),'759090002 ',''))), ' '',')
     
    The field is mandatory so I don't have to worry about null values in a replace function, but even if it wasn't mandatory I would just use a if(empty(InsertOutput), '', Replace(InsertOtherFunctions))
    to avoid the null values in replace function issues.
     
    All the integer values are available if you go to the table, go to the choices column you are using, go to edit choices, click the three dots ... and select view more.
    takolota_0-1645322994422.png

     

     

     

    takolota_1-1645322994457.png

     

  • Verified answer
    Drew Poggemann Profile Picture
    9,278 Most Valuable Professional on 26 Mar 2021 at 12:22:43
    Re: Unable to fill in option set field in dataverse using flow

    Hi @randypan ,

     

    Please check out the following article to set the Choice column based on a String value from the text field.

    Updating Dataverse Optionset/Choice from Text dynamically using Power Automate (d365geek.co.uk)

     

    Hope this helps!


    Thanks,


    Drew

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

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

#1
WarrenBelz Profile Picture

WarrenBelz 146,745 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard

Featured topics

Loading started