This is an old revision of the document!


Many numbers used in computations are not easy to remember. As an example, whole books are written to calculate the value of PI to one million decimal places.

CFL uses names to represent these constant values. These constant names can be used in a formula anywhere a number can be used. CFL will automatically replace the constant with its appropriate value.

Built-In Constants

Constant Value Description
FALSE 0 The Boolean value for FALSE
LN2 2.71828… The natural log constant
NO 0 The Boolean value for FALSE
NoDate 0 The system value used when no date is entered
OneDay 1 One Day of Time in a DateTime Type
OneHour 1/24 One Hour of Time in a DateTime Type
OneMinute 1/(24*60) One Minute of Time in a DateTime Type
OneSecond 1/(24*60*60) One Second of Time in a DateTime Type
PI 3.14159… The ratio of a circle to its diameter
TODAY Current Date/Time This (pseudo) constant returns the current date and time in a DateTime Type
TRUE 1 The Boolean value for TRUE
YES 1 The Boolean value for TRUE

Store-Wide Constants
|| Constant || Returns the value setup in pricing setup as the default multiplier for… ||

DefaultEquipmentMultiplier Equipment
DefaultFreightMultiplier Freight
DefaultLaborMultiplier Labor parts
DefaultMaterialMultiplier Materials
DefaultOtherMultiplier Other parts
DefaultOutsourceMultiplier Outsourced items
DefaultOverheadMultiplier Overhead

This value is normally multiplied by the outsourced costs to determine their price.

User-Defined Global Constants

CFL allows the user to create custom built-in constants. All these global constants are accessible from CFL. It is common to preface a constant with “gc” as in the following examples. This is not necessary, but helps to jog the memory a few months later.

Const gcBoilingPoint  212 ;
Const gcSubstance  "Water" ;
Const gcFreezingPoint  32 ;
Const gcAluminumCost  1.25 per SqFeet ;
Const gcLaborRate  20 per Hour ;
Const gcPromotionEndDate  #12/31/2007#

Global Constants can have units or be unit-less. They can be strings, numbers, or dates. They are also infrequently used for items that vary. Once a global constant has been created, it can be used in any formula as shown in the following examples:

AlumCost  : Quantity * Area * gcAluminumCost ;
LaborCost : Quantity * LaborPerPiece * gcLaborRate ;

A few rules apply to creating global constants and variables.

  1. A global constant and a variable cannot have the same name.
  2. A text constant must be less than 50 characters.
  3. Global constants must follow the same naming convention as variables.

See Also

You could leave a comment if you were logged in.