cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
koby
Regular Visitor

I want using Option Set field choose label value

I have created an entity using the option set.

In Flow, however, [value] can be selected but [label] can not be selected.

Does anyone know how to display label characters?

 

koby

2 ACCEPTED SOLUTIONS

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @koby,

Could you please share a screenshot about your flow's configuration? Is it a Microsoft Flow?

Further, do you want to get the OptionSetField_[Label] property within your flow?

 

I have made a test, and the issue is confirmed on my side. The Option Set Filed_[Label] property could not be selected directly within the Dynamic content panel, the screenshot as below:3.JPGNote: The Approval_Status column is a Option Set type column within my CDS Entity (On my side, it is TaskLists). We could only select Option Set Field_[Value] property (dynamic content) within the Dynamic content panel.

 

If you want to get the Option Set Filed_[Label] property within your flow, please take a try with the following workaround:5.JPG

Within Map field of "Select" action, enter two entries. The Key of first entry set to Approval Status Label, corresponding Value set to following formula:

 

item()?['_crd1f_approve_status_label']

On your side, you should type:

item()?['_crd1f_YourOptionSetField_label']

The Key of second entry set to Approval Status Value, corresponding Value set to Approval_Status Value dynamic content.

The flow works successfully as below:6.JPG

On your side, in order to get corresponding [Label] property related to your Option Set field, you should add a "List records" action within your flow and run your flow, then expand the "List records" action run history, the [Label] property (marked as yellow) would show up as below:4.JPG

 

More details about using expression in flow actions, please check the following article:

https://flow.microsoft.com/en-us/blog/use-expressions-in-actions/

 

Best regards,

Kris

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

v-xida-msft
Community Support
Community Support

Hi @koby,

Have you solved your problem?

 

If you have solved your problem, please go ahead and click “Accept as Solution” so that this thread will be marked for other users to easily identify.

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

12 REPLIES 12
v-xida-msft
Community Support
Community Support

Hi @koby,

Could you please share a screenshot about your flow's configuration? Is it a Microsoft Flow?

Further, do you want to get the OptionSetField_[Label] property within your flow?

 

I have made a test, and the issue is confirmed on my side. The Option Set Filed_[Label] property could not be selected directly within the Dynamic content panel, the screenshot as below:3.JPGNote: The Approval_Status column is a Option Set type column within my CDS Entity (On my side, it is TaskLists). We could only select Option Set Field_[Value] property (dynamic content) within the Dynamic content panel.

 

If you want to get the Option Set Filed_[Label] property within your flow, please take a try with the following workaround:5.JPG

Within Map field of "Select" action, enter two entries. The Key of first entry set to Approval Status Label, corresponding Value set to following formula:

 

item()?['_crd1f_approve_status_label']

On your side, you should type:

item()?['_crd1f_YourOptionSetField_label']

The Key of second entry set to Approval Status Value, corresponding Value set to Approval_Status Value dynamic content.

The flow works successfully as below:6.JPG

On your side, in order to get corresponding [Label] property related to your Option Set field, you should add a "List records" action within your flow and run your flow, then expand the "List records" action run history, the [Label] property (marked as yellow) would show up as below:4.JPG

 

More details about using expression in flow actions, please check the following article:

https://flow.microsoft.com/en-us/blog/use-expressions-in-actions/

 

Best regards,

Kris

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi Kris

 

Thank you for your response.

It was a very understandable answer.

 

I will also share this information in Japan.

 

Arigato.

 

koby

v-xida-msft
Community Support
Community Support

Hi @koby,

Have you solved your problem?

 

If you have solved your problem, please go ahead and click “Accept as Solution” so that this thread will be marked for other users to easily identify.

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

tcorcor1
Advocate I
Advocate I

Hi Koby,

 

All you need to do is input an expression like the below example into the field. 

 

i.e. Field schema name is xpp_objective:

 

Add this expression into the field (assuming the field is in the triggerBody):

 

triggerBody()?['_xpp_objective_label']


This will give you the label as a result

 

 

 

 

That does not seem to work for the "Common Data Service (current environment)" / List records connector. The label is not even fetched from the CDS, it is not even available in the JSON response.

 

Hi @v-xida-msft,

 

Great answer! It helped me a lot. Just in case someone is interested in using this with formatting emails, the solution would be to use the triggerBody function, for example, copying this where you want the label to appear:

 

@{triggerBody()?['_cr027_sociedad_label']}

 

Where sociedad is the name of my field.

 

I have a similar issue and I am sure you know how to solve it. I am trying to do the same thing for the two options field, but when using the "List records" function in the flow I can't find the label for this field (the labels for the Option Set fields do appear).

 

Thanks in advance!

 

MS

This should be the preferred solution. It is so much simpler and does not require you to create additional steps in your flow.

Anonymous
Not applicable

Hello @tcorcor1,

Thanks for posting this. It worked for me great.

I'm using the Common Data Service (Current Environment) connector.

I'm creating a Task record whenever a Power App Apps record is created in the Centre of Excellence model-driven app.

I wanted to get the label of the option set value for the field "App Type" (schema name admin_powerappstype).

In my Task I selected the Dynamic content and used the field App Type.

When the Flow ran I just got the option set number, example: 597910000. See image below.

So I used your suggestion and in Expressions added this triggerBody()?['_admin_powerappstype_label']

It worked a treat. See below. This is the description field on my Task record.

 

Task.jpg

 

One funky thing I noticed is that when I created the expression and saved the Flow, when I did a Test the Flow either failed or the expression content didn't show in the Task, I can't remember which, sorry. Either way it didn't work. I then have to go back to the Flow details page, where it shows the Name, Description etc, refresh the page, then when I go into the Flow again it works all fine. Odd, but this happens several times to me. A Microsoft Support Agent showed me this trick. 

 

Anyway, thanks so much for posting this and saving me from a big headache.

Garry

You need to add "Get a Record" step

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Users online (2,304)