cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Condition Fails When Evaluating Division

I am returning a list of SP items, then running the items in a for each loop calculating ratio between two numbers that exist on each item.  When I try to evaluate the outcome I receive an error:

 

InvalidTemplate. Unable to process template language expressions for action 'Condition' at line '1' and column '2552': 'The template language function 'greater' expects two parameter of matching types. The function was invoked with values of type 'Float' and 'String' that do not match.'.

 

I have tried converting the output of "Ratio" to an integer but receive an error on that too.  Does anyone understand why?

 

String vs FLoat.PNG

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Condition Fails When Evaluating Division

I figured out the issue  (I was really doing a percent change calculation) and the comparison I was using was a float and not an integer which was causing it to fail (clearly says so in the error message too 🙂 ).  Changing the format in the comparison to a float corrected the issue. 

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: Condition Fails When Evaluating Division

Hi WiggityZwiggity,

 

Not sure how is your flow configured, to test this issue, I create a flow looks like below to send an email if the value from compose action is greater than “10”.


There are two number columns Number1 and Number2 in my list, I use the Workflow definition Language div function, and configure the function in the Compose Inputs field as @div(item()?['OData__x0063_tf0'],item()?['OData__x0068_f38'])


The flow runs and send me emails with the items that the Compose value is greater than 10.

3.PNG

 

If possible, please show me your flow configuration to reproduce this issue on my side.

 

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Re: Condition Fails When Evaluating Division

I figured out the issue  (I was really doing a percent change calculation) and the comparison I was using was a float and not an integer which was causing it to fail (clearly says so in the error message too 🙂 ).  Changing the format in the comparison to a float corrected the issue. 

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 90 members 5,429 guests
Please welcome our newest community members: