Description
CFL provides a means for creating temporary variables which can greatly simplify coding and debugging. This page explains how to create and use these variables. See Also
Basic Discussion of Approach
We use Declare statements to make the code easier to read and follow. Instead of embedding long strings of “If/then” statements or other complicated formulas in one long formula, we break them up using easily understood labels for what each set of code (Object) is doing.
CFL pulls all the code for a Product into one large formula. We have found that Declare variables, while temporary, should not be duplicated in the formulas used in a product; so we make each one unique to the variable or form it is being used with.
Create a temporary variable for the Markup % Declare ProductMarkup := IF ProductMarkup > 0 THEN 1/( (100-ProductMarkup)/100) ELSE 1 ENDIF ; Create temporary variable for the cost of a single unit
List Price Value returns cost per square foot Declare SalePrice := ListPriceValue(UnitPriceList)* Area In SqFeet; Return the Total Price
SalePrice * ProductMarkup * Quantity
Contributor: Steve Gillispie, Acorn Sign Graphics
Date: 2/20/2011
Version: Control 04.50.1102.0401