The built-in functions that
comprise FormCalc cover a wide range of areas, including mathematics,
dates and times, strings, finance, logic, and the web. These areas
represent the types of functionality that usually occur in forms.
The purpose of the functions is to provide quick and easy manipulation
of form data in a useful way.
At the most basic level, a calculation can consist of only a
single FormCalc function. However, a single FormCalc function can
use other FormCalc functions as parameters.
To attach a FormCalc function to an object
You can add a FormCalc function
to any form design object that allows calculations and scripts,
excep for the script object.
-
Make sure that you have the multiline version of the
Script Editor displayed in the Designer workspace.
-
Select a field on your form.
-
In the Show list, select the calculate event.
-
Click the Functions icon or F10 to display a list of FormCalc
functions.
-
Select the appropriate function and press Enter.
-
Replace the default function syntax notation with your own
set of values.
-
Click the Preview PDF tab to test the form.
Built-in function syntax
Each FormCalc function uses a specific syntax
notation that you must follow in order for the function to execute
correctly. This table describes, generally, the pieces of syntax
notation.
Syntax notation
|
Replacement values
|
d
|
A valid date string (for example, 03/15/1996)
|
f
|
A valid date format string (for example,
MM/DD/YYYY)
|
k
|
A valid locale identifier (for example,
fr_FR)
|
n
|
A valid numeric value. Notice that the range
of valid values varies from function to function.
|
s
|
A valid unit of measurement (for example,
“in” for inches).
|
v
|
A valid reference syntax.
|
n1, n2, n3
|
All values are required.
|
[ [ n [, k ] ] ]
|
No values are required, but you can choose
to specify just n, or both n and k.
|
n1 [, n2 ... ]
|
n1 is required, but you can choose to specify
an unlimited number of additional values.
|
d [, f [, k ] ]
|
d is required, but you can choose to also
specify f or both f and k.
|
|
|
|