I want a script that round sum into ( nearest 100 and nearest 1000
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
Views
Replies
Total Likes
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