Level 1
Level 2
Sign in to Community
Learn more
Sign in to view all badges
Expand my Community achievements bar.
I don't now how to get the field length of a decimal field (round numbers)
And how to split the numbers to perform a calculation on them
Like:
345 = lenght 5
value1*9 = 27
value2*2 = 8
value3*4 = 20
Anyone who can help me?
Hi,
Try .rawValue.toFixed().length you might have to check that they have entered a value first, that is rawValue !== null.
Have a look at https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number and https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Math
To get the fractional part of the number try;
rawValue - Math.floor(rawValue)
Good luck
Bruce
Views
Likes
Replies