What I need is for a field to round up to the next 0.25 when doing its calculation. Currently, I have simplified field notation taking a field that shows the sum of two fields and dividing by 60.
totalpca / 60
Thank you for any help you can offer!
Do you know how to do this with paper an pencil?
1. Compute the number of whole 25 units in the value.
2. Change the value to the next larger integer.
3. Convert the number of 25 units back to a decimal number.
// field names as variables for processing;
var cField1 = "Text1";
var cField2 = "Text2";
// vlaue for decimal adjusment;
var nDecAdj = 100
// value for unit to adjust to;
var nUintAdj = 25
// clear the result;
event.value = "";
// get the values of the fields;
var oField1 = GetField(cField1);
var oField2 = GetField(cField2);
// sum the numeric values of the field;
var nSum = Number(oField1.value) + Number(oField2.value);
event.value = Math.ceil(nSum * (nDecAdj / nUintAdj)) * (nUintAdj / nDecAdj)