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.

Constant Value Description
FALSE0The Boolean value for FALSE
LN22.71828…The natural log constant
NO0The Boolean value for FALSE
NoDate0The system value used when no date is entered
OneDay1One Day of Time in a DateTime Type
OneHour1/24One Hour of Time in a DateTime Type
OneMinute1/(24*60)One Minute of Time in a DateTime Type
OneSecond1/(24*60*60)One Second of Time in a DateTime Type
PI3.14159…The ratio of a circle to its diameter
TODAYCurrent Date/TimeThis (pseudo) constant returns the current date and time in a DateTime Type
TRUE1The Boolean value for TRUE
YES1The Boolean value for TRUE

Store-Wide Constants

Constant Returns the value setup in pricing setup as the default multiplier for…
DefaultEquipmentMultiplierEquipment
DefaultFreightMultiplierFreight
DefaultLaborMultiplierLabor parts
DefaultMaterialMultiplierMaterials
DefaultOtherMultiplierOther parts
DefaultOutsourceMultiplierOutsourced items
DefaultOverheadMultiplierOverhead

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

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.