I have a calculation script that sometimes returns a decimal result. How would I create a script that would round that decimal up to the next whole number? Anyone have any idea's?
Solved! Go to Solution.
Views
Replies
Total Likes
You can use the Ceil FormCalc function. For example,
// form1.page1.nf::exit - (FormCalc, client)
$.rawValue = Ceil(nf)
Steve
Views
Replies
Total Likes
You can use the Ceil FormCalc function. For example,
// form1.page1.nf::exit - (FormCalc, client)
$.rawValue = Ceil(nf)
Steve
Views
Replies
Total Likes
okay, I am not very good with this. That command is new to me. Where would I place that script if I already have a javascript script in the calculate event of that numeric field I am trying to get rounded up?
I basically have the javascript code in the numeric fields calculate event set to
this.rawValue = subform1.numericField1.rawValue;
I tried putting your script on the change event hoping I could use formCalc there but get a error when testing saying Ceil is not defined. Thanks
Views
Replies
Total Likes
Okay nevermind.... I got it. I just changed the data format to integer in the binding tab of the Numeric Field and it worked. (Almost) it just rounds down to the lowest whole number. But Thats okay with me. Thanks
Views
Replies
Total Likes
Can you create a script where you ONLY round up and not down?
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies