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
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,504)