formulacalc
RESULT
,
FORMULA

The formulacalc statement allows you to evaluate a formula that you were not able to code into the procedure when it was being written.


Parameters

This statement has two parameters:

result – must be the name of a field or a variable where you wish the result of the formula to be placed. The formula’s resulting value must match the type and format (if any) of result or an error alert dialog will be displayed. If a field is specified it must be in the current database, even if you have specified that the formula be calculated using a different database.

formula – is the formula to be calculated. Unlike an assignment statement, the formula is contained in a formula, allowing you to change the formula on the fly. If the formula doesn’t need to be changed you must enclose it in quotes, otherwise you can store the formula in a variable.


Description

This statement calculates the result of a formula. This statement allows you to:

To find out if an error occurred you must check the info(“error”) function.

This simple example allows the user to enter a calculation to be performed using a Checkbook database.

local myFormula,myResult
gettext "Enter Formula:",myFormula
formulacalc myResult,myFormula
message myResult

See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0.