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
Super User

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.

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
Super User

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
Super User

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,860)