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

Convert true/false to yes/no

Hi,

 

I've had a look through here and tried some of the suggestions but am having no luck.

 

I have a Yes/No column in SharePoint that is used as a toggle in PowerApps.

 

I'm trying to convert the true/false value it gives in Flow to Yes/No to be displayed in a table in an email.

In the column I am testing I have put the expression (and variations of it)

 

 

if(equals(triggerbody()?['PersonnelNumberRequested?'], true),'Yes','No')

 

However this returns as No regardless if it is true or false. 

See image with expression and actual value below.

 

StewG_2-1655392952980.png

 

What am I missing? I keep going round in circles with this.

 

This is my whole Flow so far for reference:

StewG_0-1655392605281.pngStewG_1-1655392639406.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
ekarim2020
Super User
Super User

Hi @StewG ,

 

Looking at the screen shots, I think the expression needs to be:

 

if(equals(item()?['PersonnelNumberRequested'], true),'Yes', 'No')

 

The expression needs to reference the data from the Get items - for table action:

Snag_5346070.png


Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

2 REPLIES 2
ekarim2020
Super User
Super User

Hi @StewG ,

 

Looking at the screen shots, I think the expression needs to be:

 

if(equals(item()?['PersonnelNumberRequested'], true),'Yes', 'No')

 

The expression needs to reference the data from the Get items - for table action:

Snag_5346070.png


Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.

Amazing thank you! It works! I knew it would be something obvious.

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,627)