Highlighted

sum round

khaldoona993089

18-01-2019

I want a script that round  sum into ( nearest 100 and nearest 1000232.jpg

Replies

Highlighted

smacdonald2008

18-01-2019

As I mentioned in the same thread yesterday (please do not post same threads as we will delete one of them)  - this is not an Experience Manager question - but a general code question. For this question - look at the great online threads that answer this - such as how to round using JavaScript -- javascript - Round number to nearest thousand, up or down depending on the number - Stack Overflow

Highlighted

Mayank_Gandhi

Employee

21-01-2019

Hi Khaldoon,

As Scott mentioned you can use common JS functions in this case.

Math.round will work fine in this case.

When you do a set value for the field, put it something this

NumericField1.rawValue=Math.round(this.rawValue);

Thanks,

Mayank