These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Rounding Down

Xenuite
Registered: Jun 12 2008
Posts: 4

Is there a way to force numbers to round down in Simplified Field Notation?

My Product Information:
Acrobat Pro 8.1.2, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
No. "Simplified Field" notation requires the use of very simplified field names and number or string values only. No use of function calls, field properties, field methods, objects, etc. By simplified field names, I mean no spaces or periods in the field names. Periods are very useful certain of field name array operations in more advanced scripts.

With some simple JavaScript one can round down, change the value to the next lowest integer, using the "floor" method of the "Math" object and the following script in the "Custom calculation script":

var MyFieldName = "Field Name String"; // enter the field name between the quotes
event.value = Math.floor(this.getField(MyFieldName).value);

George Kaiser