cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
WebPortal
Post Prodigy
Post Prodigy

Logic condition always returns FALSE!

This is my Excel table:

 

WebPortal_0-1603825392154.png

 

This is the Flow:

WebPortal_1-1603825414897.png

 

When I test it, the logic test of the condition always returns "FALSE":

 

WebPortal_2-1603825473603.png

 

WHY????

1 ACCEPTED SOLUTION

Accepted Solutions

Because it gets converted to json. Use

string(1)

in the right side of the comparison

StringNumber.PNG 

View solution in original post

11 REPLIES 11
abm
Super User III
Super User III

Hi @WebPortal 

 

Try to convert the excel value to integer using int() expression.

 

image.png



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

@abm 

Sure, what you're proposing is exactly the same what I'm doing.

abm
Super User III
Super User III

Hi @WebPortal 

 

I couldn't see that in the screenshot you provided? You are not converting to integer. Are you saying that you tried to convert to integer and its not working?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials
tom_riha
Super User II
Super User II

Or try to convert the 1 into string, instead of 1 put there '1'.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

@tom_riha 

 

I did (although I have no clue why), but I still get always false.

@abm 

 

The column "Numero" is an integer in Excel.

 

In Power Automate I'm getting that column for the 1st part of the condition, how (and why) am I supposed to FORCE IT AGAIN an integer?

 

Thanks

Because it gets converted to json. Use

string(1)

in the right side of the comparison

StringNumber.PNG 

View solution in original post

abm
Super User III
Super User III

Hi 

 

I have tested this now. If you convert to int() it should work as expected. Below the expression I used is

 

int(items('Apply_to_each')?['Taken Days'])
 
Here Taken Days is my excel numeric column.

 

image.png

 

 

My test result

 

image.png



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

@Paulie78 

You're kidding me 😁😂!

This is crazy... anyway, it worked!

🙂

 

Thanks, this is too bizarre to me..

 

SELECT * FROM 

WHERE this == that

 

Has been invented some 40 years ago, and it always worked!

 

Anyway, I'm trying the zen mode and to learn something new, thank you so much!

@abm your solution also works, athough is more complicated.

Thank you for your help!

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (58,658)