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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Get Selected Option Set Labels as Text

(0) ShareShare
ReportReport
Posted on by 905

Hello everyone!


I have created a Flow for Leads entity to get added data in sub-grid, and send the selected data to an email.

The problem I am facing is in the flow the selected option set is returning the result as a number instead of showing the label text of the added items.

Here are some screenshots:

87304.Capture.PNG3487.Cap2.PNG

In those screenshots, I've mentioned above it's showing that 100000003 is the value of the "Item" text. As you see here it's returning the value of the option selected instead of showing the text "Item".

I have found this tutorial, and it's very helpful to find all the options set and its related details from the StringMap table.
But unfortunately, In this tutorial, it returns the selected option set as values, instead of showing the label text.

Here is the code to get the selected options set:

    
        
        
            
            
             
        
    

Here I am using the same script inside my flow:

0116.Flow.PNG

What I should change in the script to get the selected label as text and use it in my flow?

Any help will be greatly appreciated.

Thank you!

I have the same question (0)
  • Suggested answer
    TylerS.Dev Profile Picture
    729 on at

    Try changing your last condition from 'attributevalue' to 'value', attributevalue will get you the number from option set so you are actually comparing the value instead of label.

  • LeoAlt Profile Picture
    16,331 Moderator on at

    Hi partner,

    I found a simialr thread about how to use flow to get the option set label.

    powerusers.microsoft.com/.../163269

    flow.microsoft.com/.../

    Hope it helps.

    Best Regards,

    Leo

  • EBMRay Profile Picture
    905 on at

    Hello Tyler S,

    I have changed the condition as you mentioned but as a result, nothing has been changed and it keeps showing the value of the item instead of text.

  • EBMRay Profile Picture
    905 on at

    Hello LeoAlt,

    Those threads are very helpful but unfortunately, I couldn't achieve my needs.

    I have tried to use this expression that is mentioned in the solution:
    item()?['_crd1f_MYOptionSetField_label'], as result it doesn't return any values.

    Here is a screenshot:

    0572.Capture2.PNG2018.Capture3.PNG

    As you see on those screenshots nothing is returned as the value after using the expressions I have mentioned.

    Thanks for your support!

  • LeoAlt Profile Picture
    16,331 Moderator on at

    Hi partner,

    Thanks for your reply.

    Since you are using Flow to archieve your requirement, I suggest that you could ask the question in flow community for more professional answers and helps.

    powerusers.microsoft.com/.../MPACommunity

    Happy new year!

    Best Regards,

    Leo

  • EBMRay Profile Picture
    905 on at

    Thank you very much.

    Happy new year!

  • Suggested answer
    Linn Zaw Win Profile Picture
    3,407 on at

    SmithBZ

    With the latest update of Common Data Service (current environment) connector, we can now query the formatted values of supported field types such as lookup display name, option set value label, formatted date/time by using the OData.Community.Display.V1.FormattedValue property of the field in the expression.

    linnzawwin.blogspot.com/.../get-lookup-display-name-and-option-set.html

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 70 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 33 Most Valuable Professional

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans