cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DVader
Frequent Visitor

How do you get the text value for a Choice field in a Power Automat Flow?

In our Power Apps application we have a Choice Field with three options.

 

DVader_0-1622117565299.png

 

As part of our business process we have a Flow that populates a Word template that gets e-mailed. In the flow I have an "Initialize Variable" step that is supposed to get the value from the choice shown above.

 

DVader_1-1622118203299.png

But instead of getting the text value I'm getting the internal ID for the Choice.

 

What do I need to do to get the text value for the choice and not it's internal ID?

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Dual Super User
Dual Super User

Hi @DVader,

 

You could use an expression to retrieve the label via the OData.Community.Display.V1.FormattedValue. 

 

Below is an example with customertypecode.

 

The value would be:

outputs('Get_a_row_by_ID')?['body/customertypecode']

 

The label is:

outputs('Get_a_row_by_ID')?['body/customertypecode@OData.Community.Display.V1.FormattedValue']

expression_customertypecodelabel.png

View solution in original post

2 REPLIES 2
Expiscornovus
Dual Super User
Dual Super User

Hi @DVader,

 

You could use an expression to retrieve the label via the OData.Community.Display.V1.FormattedValue. 

 

Below is an example with customertypecode.

 

The value would be:

outputs('Get_a_row_by_ID')?['body/customertypecode']

 

The label is:

outputs('Get_a_row_by_ID')?['body/customertypecode@OData.Community.Display.V1.FormattedValue']

expression_customertypecodelabel.png

DVader
Frequent Visitor

@Expiscornovus Thanks so much. That worked!

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.

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.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (2,195)