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
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.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (2,884)