System formulas
The
Custom Formula
window includes, in the right pane, a collection of system formulas that address specific situations. The formulas available include dates, expressions, and math formulas.
Dates - Add Days / Add Months
[Add Days(Today’s Date, 1)]
The
Add Days
formula enables you to output a date that is a specified number of days away from another date, such as today’s date. You can substitute another date variable for
Today’s Date
by inserting it from the available application data items.
The number after the comma determines the number of days away from the specified date that the formula should display. The default formula provided by the application, shown previously, would output tomorrow’s date (today’s date + 1 day). You can use a negative number to output an earlier date.
[Add Months(Today’s Date, 1)]
The
Add Months
formula is similar to
Add Days
but adds months rather than days.
[Minimum Date]
This is a static reference date, 1/1/1900.
[Date Format(Today’s Date, "MMMM d, yyyy")]
The
Date Format
formula enables you to specify the format for the date used in the formula. In the default formula, shown earlier, a sample date would be displayed as January 1, 2009. Here are some other examples:
MMMM dd, yyyy —
January 01, 2009
[Today’s Date]
Outputs the current date when printed.
This
Formula Variable
can be used to count the span between 2 date variables. Place the earliest date first and the latest date last. For instance, if you wanted to calculate a client’s age you could compare the
Individual Date of Birth
variable with the
Today’s Date
variable.
[IF(formula,true,false)]
Lets you create a condition that outputs different results based on whether the condition is met. Substitute a condition for "formula," such as a dollar value being greater than or equal to a specified amount, and substitute static values, application data items, or expressions for "true" and "false." The true value will print when the condition is met, and the false value will print otherwise.
To create the condition, you can use comparison operators such as greater than (>), less than or equal to (<=), not equal to (<>), and so on.
You can also create IF expressions using the
IF Expression
tab at the bottom of the
Custom Formula
window.
[Abs(-2 * 12.3456)]
Outputs the absolute value, which is always positive. If a calculated amount results in a negative number, the Abs formula drops the minus sign.
[Round(12.3456,2)]
Rounds numbers to a specified number of decimal places. Substitute an application data item or expression for "12.3456." The value after the comma is the number of decimal places you want used for the rounded result.
[Truncate(34.5678)]
Converts a decimal to an integer by dropping the digits after the decimal point instead of rounding. In the example, 34.5678 = 34.