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

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

Thank you so much for this. I was having the same issue as StewG and could not figure it out. 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (4,364)