cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NigWatson
Helper I
Helper I

Flow Condition Failing

Hi folks,

 

I'm trying to build a series of flows to follow a process and send emails and update feilds along the way.

 

The problem I have is that the Condition is failing.

The feild is a choice feild of either 0 or 100 ( I need numeric values for later Power BI conditional formatting)

If i set the condition ot 'is equal to' 100 the result comes back as false.

If I add double quotes ("100") it returns as true, but then somehow the quotes are removed from the condition and it returns as false again.

It's doing my head in.

5 REPLIES 5

Hi @NigWatson have you tried using an expression to cast your value as an int?

 

e.g. int(@triggerBody()['myfield'])





Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!
If you liked my response, please consider giving it a thumbs up. THANKS!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

Hi Matt,

 

Sorry, you lost me.

Could you explain a little?

 

Thanks

The behaviour you described in your original post suggests to me that your value of "100" is being treated like a string, yet the underlying data type is integeter so Flow is getting itself confused.

 

So rather than it being:

MyField is equal to 100 - where MyField is being treated as a string

 

Try using an expression which will mean that you can tell it explicitly that it's an integer:

int(triggerBody()['MyField']) is equal to 100

 

If you've not played with expressions before let me know and I'll provide a bit more detail about those, but effectively they give you a lot more scope over what you can do with your data.





Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!
If you liked my response, please consider giving it a thumbs up. THANKS!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

Hi Matt,

 

I'm having trouble with the expression

 

int(triggerBody()['MyField'])

 

I get the following error:

 

InvalidTemplate. Unable to process template language expressions for action 'Condition' at line '1' and column '2550': 'The template language expression 'int(triggerBody()['RefCheck* Value'])' cannot be evaluated because property 'RefCheck* Value' doesn't exist...

Sorry @NigWatson , I've missed a ? from the expression, need more coffee when trying to answer at night!

 

It should be int(triggerBody()?['MyField']) so for example if I want to explicitly cast the ID field as integer, then it would be: int(triggerBody()?['ID'])

 

So yours would be: int(triggerBody()?['RefCheck'])





Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!
If you liked my response, please consider giving it a thumbs up. THANKS!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,940)