cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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 blog

Power Automate Video Tutorials

@abm 

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

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 blog

Power Automate Video Tutorials
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. ]

[ ... and if you like my response, you might like also the tips and solutions on my Power Automate related blog ]

@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

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 blog

Power 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
New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (72,274)