Please someone can help me helpppp

I’m doing a calculation but the value is returning with many decimal places, example returns 0.9999999999
and I want it to return only 0.9999
someone explain to me how to put the formula ROUND(0.9999999999, 4)

inside MULTIPLY(outputs[“HTTP request”].resBody, 1.4) ??? help me i’m new here

if you want to round the result:
Try:
ROUND(MULTIPLY(outputs[“HTTP request”].resBody, 1.4),4)
OR if you want to round the output try:
MULTIPLY(ROUND(outputs[“HTTP request”].resBody),4), 1.4)

1 Like

Did you check the calculation itself does that work fine? Also is the type of the value set correctly to number in the variable configuration?

I mean you seem to multiply a number type with a JSON type. Which might not be the best idea.
Also you can simply use the “*” instead of the formula MULTIPLY(), but as you please.
So I suggest doing this:

ROUND(MULTIPLY(NUMBER(outputs["HTTP request"].resBody), 1.4), 4)
ROUND(NUMBER(outputs["HTTP request"].resBody)*1.4, 4)

Just really make sure you multiply numbers. Because for example if you bind a variable number type to an input field that might also break the flows as the input field value has multiple types allowed (text / number). So I suggest using the NUMBER() formula to force the number type.

2 Likes

I would do something like;

Integer (var x 10000) this gives you 9999 as your result, then / 10000.