cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
thecharwest
Helper I
Helper I

Converting Option Set Values to Labels using Dataverse

Hello!

 

I found this article about getting the label of an option set value, but it's all referring to the old CDS rather than Dataverse so I'm hoping to get an updated answer. 

 

In my flow, when a Lead is created, I'd like to send an email containing the labels from an option set in the Lead. 

 

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Gaznae
Advocate IV
Advocate IV

Hi, @thecharwest 

 

I think the following would work. I have used the same example used in your link to show a before and after.

 

Before: Triggeroutputs()?['body/_leadqualitycode_label']

After: Triggeroutputs()?['body/leadqualitycode@OData.Community.Display.V1.FormattedValue]

View solution in original post

4 REPLIES 4
Gaznae
Advocate IV
Advocate IV

Hi, @thecharwest 

 

I think the following would work. I have used the same example used in your link to show a before and after.

 

Before: Triggeroutputs()?['body/_leadqualitycode_label']

After: Triggeroutputs()?['body/leadqualitycode@OData.Community.Display.V1.FormattedValue]

thecharwest
Helper I
Helper I

Hiya @Gaznae

 

I tried this with my field which is called "samar_websitefieldisoqarstandards" and put in an expression like this:

 

triggerOutputs()?['body/samar_websitefieldisoqarstandards@OData.Community.Display.V1.FormattedValue']

 

It lets me add this to a Compose stage, but when I add that to an email, even if the field contains data, it comes back blank in the email. Am I missing a step somewhere?

 

I ended up following this guide: https://linnzawwin.blogspot.com/2020/07/get-lookup-display-name-and-option-set.html

 

Thanks for your help so far.

Hi, @thecharwest 

 

You will need to change triggerOutputs() to the output of the action where this field is present. For example, body('Create Lead')?

thecharwest
Helper I
Helper I

Hi @Gaznae - thanks! I finally managed to figure it all out with your help. Really appreciate it. 

 

Here it is for anyone seeing this in the future and wanting to understand the whole thing:

How to show values in flows.PNG

 

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

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.

Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022- Season 2 has kicked off!

Users online (4,901)