cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
petergraham03
Level: Powered On

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
Level: Powered On

Re: Flow with a Condition Checking a Value

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
Level: Powered On

Re: Flow with a Condition Checking a Value

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

Highlighted
petergraham03
Level: Powered On

Re: Flow with a Condition Checking a Value

You are correct.

 

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

 

Thanks

jrowe
Level: Powered On

Re: Flow with a Condition Checking a Value

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.

jrowe
Level: Powered On

Re: Flow with a Condition Checking a Value


@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.

petergraham03
Level: Powered On

Re: Flow with a Condition Checking a Value

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.
jrowe
Level: Powered On

Re: Flow with a Condition Checking a Value

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)

 

javierz
Level: Powered On

Re: Flow with a Condition Checking a Value

works for me

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

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