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,

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
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

<
Users online (2,982)