1

In flow, I am using actions below:

  1. Get items
  2. Select action using data from above action

Inside select, I am using custom headers and mapping it to dynamic values coming from SP as shown below.

enter image description here

Amount as an example is a number field and for some reason I am having issues with rounding decimal value.

I am using an expression that I found from flow community as below:

if(equals(mod(item()?['Amount'],1),0),
concat(item()?['Amount'],'.00'),
concat(first(split(string(item()?['Amount']),'.')),'.',
substring(concat(last(split(string(item()?['Amount']),'.')),'0'),0,2)))

expression above works and makes sure that only two decimals are returned but its still not returning accurate results. For example 9.778 gets resolved as 9.77 which in theory should be 9.78, similarly 40.325 gets resolved as 40.32 instead of 40.33.

Can someone please help me with the correct formula so that I can use, I am really stuck since two days for this and have not been able to get it to work, please help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.