cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
petergraham03
Frequent Visitor

Flow with a Condition Checking a Value

Has anyone had success doing a condition in a flow based on a numeric value passed from a powerapp?

 

Everytime I try, the value never passes the condition.

 

For example: 

 

Condition is "{value from app} [is not equal to] 12345"

Value from input box on app has 12345 entered in it.

 

This condition is always resulting in "Yes"

 

Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
Jamarchi
Advocate II
Advocate II

Hi

 

You have to be clear that the information that you send from your app to the flow is text, so in this case when you sent 12345 you really are sending "12345" I think it can be the problem

 

Please let me know if this helped you

 

Regards,

View solution in original post

7 REPLIES 7
Jamarchi
Advocate II
Advocate II

Hi

 

You have to be clear that the information that you send from your app to the flow is text, so in this case when you sent 12345 you really are sending "12345" I think it can be the problem

 

Please let me know if this helped you

 

Regards,

View solution in original post

You are correct.

 

I corrected the issue by passing the result of "value(text input box)" to the flow.

 

Thanks

This has been driving me nuts for days.  What an unnecessarily cumbersome system.  Flow should be smart enough to check for that. It's smart enough to keep changing my condition check from '1' to 1 when I switch from advanced to basic. If I enter 1 in the condition value and switch to advanced I see @equals(triggerBody()['Sendanemail_Body_20'], 1), if I change that to @equals(triggerBody()['Sendanemail_Body_20'], '1') then my flow works. But when I switch back to basic view the condition value changes back to 1 and the flow fails.

 

I also tried using Contains instead of Is Equal To with the same results.

 

Putting single or double quotes around the number doesn't work because then the flow just adds more double quotes around it and compares it to the number with quotes. Putting quotes around the number should tell flow to compare it as a string.


@petergraham03 wrote:

You are correct.

 

I corrected the issue by passing the result of "value(text input box)" to the flow.

 

Thanks


You passed it from where?  I tried adding Value() to the powerapps button but that never changed anything.  The ONLY way I have been able to get this to work is as posted in my previous post by adding the single quotes around the vale in Advanced mode of the condition. But Flow keeps changing those back so my flow fails.

Sorry, as you can see from the date on my post I worked on this some time ago and don't remember exactly how I corrected it. I believe I did put the value() function the parameters being passed from the button action in the power app. This makes sense to me for it to be there as it would convert the text value to a number at that point before sending it to Flow. Good luck.

For those that run into this problem add the int() function to your flow.  Not sure if this is the preffered method but it works and Flow doesn't stupidly try to change it back.

 

Example:

@equals(triggerBody()['Sendanemail_Body_20'], 1)

 

change to

 

@equals(int(triggerBody()['Sendanemail_Body_20']), 1)

 

works for me

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.

Top Solution Authors
Top Kudoed Authors
Users online (1,887)