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
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (1,525)