Hi all,
I'm trying to subtract an MS Form submission value from a SharePoint list item value. This works well using the following expression in a compose operation with a whole number:
sub(int(outputs('Get_Item')?['body/RemainingDays']),int(outputs('Get_response_details')?['body/rbc6d3eaefe164d4daafd160f4304ac64']))
However, if my 'Get_response_details' value is 0.5 the flow fails. This is a valid scenario as I am calculating days and this would be a half-day.
How can I change this to allow it to accept 1 decimal place?
Thanks in advance for any advice.
When you use INT() it converts the number to an integer. A whole number. For decimals you'd have to use FLOAT() instead. Change your formula to this and it should work.
sub(float(outputs('Get_Item')?['body/RemainingDays']),float(outputs('Get_response_details')?['body/rbc6d3eaefe164d4daafd160f4304ac64'])
Hi @Anonymous
how about create variable of type float and store response of this expression inside that variable first before using it ...
hope this helps..