Forum Discussion
KarenCote
10 months agoCommunity Member
Rounding Off and Specifying Decimal Points to Display in Numeric Data Entry Fields
I would like to be able to restrict entries in a numeric data field to 2 decimal points. Also, when using numeric data fields for users to enter numbers which will be used to perform calculations, I...
WaltHamilton
9 months agoSuper Hero
Restricting to a certain number of points needs to be done with Javascript, inputting each character individually. I'm sure I have seen some suggestions for doing that here on the forum. As for rounding and displaying, that's a two-step activity. You first have to take the number into JS, and manipulate it. Then you return it to SL and display it. The problem (and the benefit that makes it work) is that when JS returns it , SL thinks it is a text. It has to be put into a text variable, but at least it isn't subject to SL's policies for displaying numbers. Then if you want to perform further calculations, you have to use the original variable, and repeat the process to display it.