|

Version
This will help you identify if you are using the most recent version. It is only a memo and is not changeable. If you have any support questions please supply this version number.
Form
Name
Enter the name of the form where FormUlator resides. To discover
the form name, click on the form "Settings..." button
in the property palette of the layout region.
Calculate
Type
Select how the total(s) will be calculated.
- Button
- Total(s) will be calculated only when the button is pressed.
- onSubmit
- Total(s) will be calculated only when the form is submitted.
The Formulator button will not be visible when the page
is published.
- Both
- Total(s) will be calculated both when the button is pressed
and when the form is submitted.
- Neither
- Total(s) will not be calculated. The FormUlator button
will not be visible when the page is published.
Button
Text
If Calculate Type is set to either Button or
Both, this option will be available so that the button
text can be customized.
Use
w/FormValidator
This option is only available if an instance of FormValidator
resides in the same form layout region as Formulator For proper
integration, configure FormValidator according to its directions
and set this option to Yes. This will force validation
of the form prior to the calculation of the total(s). If FormValidator
invalidates the form, an error message is produced, and no
total(s) returned. Requires FomValidator 5.05 or later.
#
of Calculations
Enter the number of calculations required. A single calculation
returns a single total that is outputted to a single form
field. So, naturally, if multiple totals are needed--subtotals,
for example--multiple calculations are a necessity. For each
calculation, the following property palette fields will appear.
The properties pertaining to a single calculation are prefixed
with a incremental number (represented in the tutorial with
a n).
- n
- # of Variables
Select the number of variables in the calculation. A variable
is a form field input that is part of the calculation. For
each variable, the following property palette fields will
appear. The letter and number combination following the
dash in each property field is the variable name. The letter
and number combination is represented in this tutorial as
xx, but in reality will be a letter followed by a
number. Example: "A1".
- n
- xx Field Name
Enter the name of the form field.
- n
- xx Type
Select the input type of the form field. This is required
so that the form field values can be properly obtained.
- n
- xx Unselected Value
Enter a value that will be used in place of the variable
if the form field is unselected or improperly defined.
The intention of this value is to cause a cancellation
of the effect the variable has within the calculation.
Examples: 60x1=60, 60+0=60, 60/1=60, and 60-0=60.
- n
- Formula
Use the variables--previously defined--to write a formula
that represents the relationship between the form elements.
Example: A1+A2*A3.
Mathematical operators:
|
+ |
= |
Addition |
|
- |
= |
Subtraction |
|
* |
= |
Multiplication |
|
/ |
= |
Division |
Variables
can be used repeatedly within the formula along with constants.
Example: 3.14*A1*A1. Variables are case sensitive!
- n
- Total
Enter
the form field name where the total will be outputted. This
form field must either be a Form Edit Field or a Hidden
Field.
- n
- Decimal Places
Select the number of decimal places the total will be calculated
to (handy for monetary calculations).
- n
- Trailing Zeros
If Decimal Places has been set higher than 0, select
whether trailing zeros after the decimal point should be
excluded or included in the output.
- n
- Use Commas
Yes or No.
- n
- Before Text
Use this if you would like to see something appear before the calculated number, such as a $ or DM symbol, for example.
- n
- After Text
Use this if you would like to see something appear after the calculated number, such as square feet, for example.
Important
Notes
- Calculations
are carried out using normal mathematical precedence. Be
sure to use parentheses, when necessary, to explicitly state
precedence.
- Form
field names cannot have spaces or non-letter/number characters.
- Form
fields should not be named the same as the variables (A1,
A2,...B1,B2,...etc).
Advanced
Usage
- The
output (total) of an earlier calculation can be used as
an input in a following calculation.
The
following is a list of commonly used mathematical functions
that can be used within a formula. To properly use these functions,
simply plug them into the formula as you would any number
or variable. Example: 3.14*Math.pow(A1,2) Also, note
that variables can be used as arguments within the functions.
|
Compute an absolute number |
| Synopsis |
: |
Math.abs(x) |
| Arguments |
: |
x |
Any
number. |
| Returns |
: |
The
absolute value of x. |
|
Example
|
: |
Math.abs(-50)
= 50 |
|
Round a number up |
| Synopsis |
: |
Math.ceil(x) |
| Arguments |
: |
x |
Any
numeric value or expression. |
| Returns |
: |
The
closest integer greater than or equal to x. |
|
Example
|
: |
Math.ceil(4.01)
= 5 |
|
Round a number down |
| Synopsis |
: |
Math.floor(x) |
| Arguments |
: |
x |
Any
numeric value or expression. |
| Returns |
: |
The
closest integer less than or equal to x. |
|
Example
|
: |
Math.floor(4.99)
= 4 |
|
Return the larger of two numbers |
| Synopsis |
: |
Math.max(a,b) |
| Arguments |
: |
a,
b |
Any
two numeric values or expressions. |
| Returns |
: |
The
larger of the two value a and b. |
|
Example
|
: |
Math.max(5,10)
= 10 |
|
Return the smaller of two numbers |
| Synopsis |
: |
Math.min(a,b) |
| Arguments |
: |
a,
b |
Any
two numeric values or expressions. |
| Returns |
: |
The
smaller of the two values a and b. |
|
Example
|
: |
Math.min(5,10)
= 5 |
|
Compute a power |
| Synopsis |
: |
Math.pow(x,y) |
| Arguments |
: |
x |
The
number to be raised to a power |
| y |
The
power that x is to be raised to. |
| Returns |
: |
x
to the power of y. |
|
Example
|
: |
Math.pow(5,2)
= 25 |
|
Round to the nearest integer |
| Synopsis |
: |
Math.round(x) |
| Arguments |
: |
x |
Any
number. |
| Returns |
: |
The
integer closest to x. |
|
Example
|
: |
Math.round(5.55)
= 6 |
|
Compute a square root |
| Synopsis |
: |
Math.sqrt(x) |
| Arguments |
: |
x |
Any
numeric value or expression greater than or equal to zero. |
| Returns |
: |
The
square root of x. |
|
Example
|
: |
Math.sqrt(9)
= 3 |
[
Back to Getting Started
with FormUlator ]
[
to top of page ]
|