Constant Class
A constant object represents a constant statement in an analytic calculation rule.
Note: This is not the same as the constants class.
A constant object exposes all the constants that are passed to the constructors of the various RuleExpression objects.
Use the following to create a constant class object:
&Constant = create Constant(&Constants.Constant_Type, [&Constants.]Constant_Value);
where Constant_Type is one of the following:
Value |
Description |
---|---|
Constant_Type_Builtin |
The Constant_Valueis an analytic calculation engine built-in function. In this instance, the constant value must be prefaced with an already instantiated constants object. For possible values, see below. |
Constant_Type_Number |
The Constant_Value is a number. |
Constant_Type_Literal |
The Constant_Value is a string. |
When the Constant_Type is Constant_Type_Builtin, the Constant_Value is one of the following:
Constant_Builtin_ALL
Constant_Builtin_BASE_E
Constant_Builtin_DEFAULT
Constant_Builtin_DETAILS
Constant_Builtin_DIRECT
Constant_Builtin_FALSE
Constant_Builtin_FORWARD
Constant_Builtin_PI
Constant_Builtin_REVERSE
Constant_Builtin_TRUE
The following code creates a PeopleSoft Analytic Calculation Engine built-in function to be used as a constant:
&Constant = create Constant(&Constants.Constant_Type_Builtin, &Constants.Constant_Builtin_REVERSE);
The following code creates a literal (string) constant:
&Constant = create Constant(&Constants.Constant_Type_Literal, "GENERAL");
The following code creates a number constant:
&Constant = create Constant(&Constants.Constant_Type_Number, "-1");