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

Condition Based on Number Calculated Field

Hi everyone,

 

I am trying to create a simple scheduled flow linked to a SharePoint list that will send an email for each item when the column 'Remaining Hours' is less than 10. But I keep getting an Action Failed error saying Invalid Template. Not sure if it makes a difference but the Remaining Hours is a calculated column. 

 

I have attatched images of the list, the column setup and the flow.

 

I hope you can help.

 

Many thanks,

 

Karl

Flow - Configuration.pngFlow - ConfigurationFlow - Failure.pngFlow - FailureList - Allocated Hours.pngList - Allocated HoursList - Hours Worked.pngList - Hours WorkedList - Remaining Hours.pngList - Remaining HoursList - Values.pngList - Values

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Condition Based on Number Calculated Field

@KnipeBolland 

The condition should be inside of the apply to each action - just like in your original Flow.

There should be no apply to each in the "yes" side of the condition.

 

So, if you go back to your original Flow and just change the left side of the condition to what I provided in my screen shot, you should be OK.

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

8 REPLIES 8
Super User
Super User

Re: Condition Based on Number Calculated Field

@KnipeBolland :

You can add an expression to the left side of the condition which converts the value to an integer and it should work for you.

Please note that the value you want may not be available via dynamic properties and you'll have to enter it manually in the expression.  The expression that I used is in the comment area of the condition.  The screen shot below is from a Flow that runs without error based on a list that I created from your screen shots.

Condx.jpg

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Super User
Super User

Re: Condition Based on Number Calculated Field

The other thing I was going to suggest was to put the "10" in the expression window.  I've seen where it doesn't recognize the criteria as an integer, otherwise.

 

-Ed-

 

KnipeBolland
Level: Powered On

Re: Condition Based on Number Calculated Field

Thanks Scott @ScottShearer and Edd @edgonzales so much for your prompt reponses.

 

I have just tried what you requested and I am recieving a different error now when I try and save the flow after adding the expression.

 

I have attatched a screenshot.

 

Thank you for you help with this.

 

Karl

Flow - Fail 2.pngFlow Failure Message 2

Super User
Super User

Re: Condition Based on Number Calculated Field

@KnipeBolland 

The condition should be inside of the apply to each action - just like in your original Flow.

There should be no apply to each in the "yes" side of the condition.

 

So, if you go back to your original Flow and just change the left side of the condition to what I provided in my screen shot, you should be OK.

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

KnipeBolland
Level: Powered On

Re: Condition Based on Number Calculated Field

Thanks Scott!

 

Opened the wrong flow when I came to test it. 

 

All works perfectly now thanks so much for your help!

 

Karl

KnipeBolland
Level: Powered On

Re: Condition Based on Number Calculated Field

Hi Scott @ScottShearer ,

 

I wonder if you can help again, all has been working fine until the remaining hours has a .5 value in it then it appears to fail again on that specific item.

 

Have you any idea what the issue could be?

 

Thank you

 

Karl

Flow - Fail 3.pngFlow Fail on itemList - Values with .5.pngList view with ,5 value

Super User
Super User

Re: Condition Based on Number Calculated Field

@KnipeBolland 

You'll want to replace int in your expression with float - everything else should remain the same.

float(items('Apply_to_each')?['Remaining_x0020_Hours'])
 
 
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
KnipeBolland
Level: Powered On

Re: Condition Based on Number Calculated Field

Thanks Scott works perfectly!


Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Coming Soon: T-shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate 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!

Top Solution Authors
Top Kudoed Authors
Users online (6,020)