This chapter provides an overview of the Analytic Engine Metadata classes, and discuses:
Using the Analytic Calculation Engine Metadata classes
Error handling
Data types of the Analytic Calculation Engine Metadata objects
Scope of Analytic Calculation Engine Metadata objects
How to import the Analytic Calculation Engine Metadata classes
How to create an Analytic Calculation Engine Metadata class object
Analytic Calculation Engine Metadata classes reference
PeopleSoft Analytic Calculation Engine comprises a calculation engine plus several PeopleTools features which enable application developers to define both the calculation rules and the display of calculated data within PeopleSoft applications for the purposes of multi-dimensional reporting, data editing and analysis.
More specifically, developers create analytic models in order to define the rules which are used to calculate data. Developers also create PeopleSoft Pure Internet Architecture pages with analytic grids in order to display the data within PeopleSoft applications. End users view, analyze and make changes to this data. When end users save their changes, PeopleSoft Analytic Calculation Engine recalculates the data and saves the calculated data to the database.
PeopleCode enables developers to manipulate analytic calculation data as follows:
Use the Analytic Calculation Engine classes to either retrieve or specify data in an instance of an analytic model loaded into the system, and also to calculate (or recalculate) cube values.
Use the Analytic Calculation Engine metadata classes to manipulate an analytic model definition. For example, you can add cubes to a cube collection or rename an existing user function for a model.
Use the Analytic Grid classes to manipulate the display of analytic calculation data on a page.
Use the Analytic Type classes to manipulate an analytic type definition. For example, you can specify a new analytic model for an analytic type definition.
See Also
Analytic Calculation Engine Classes
You can create analytic model definitions using PeopleSoft Application Designer. PeopleSoft provides the Analytic Calculation Engine Metadata classes for accessing these definitions at runtime.
You can also create an analytic model definition in PeopleCode, using the Create method, then saving it to the database using the Save method. After you save the definition, you can access it using PeopleSoft Application Designer.
All of the primary objects (dimensions, cube collections, cubes, and so on) are instantiated from an analytic model object, so you only need to create an instance of the analytic model. You can also build a rule as an object instead of as a string.
If you insert or delete an object from a group of objects, any existing object references are no longer valid. For example, if you use the DeleteCube method, any existing references to cube objects are no longer valid. You need to create any object references after using any insert or delete method.
The RuleExpressions sub-package contains several classes. Each of these classes represents the different parts of the analytic calculation engine rule grammar. These objects are created using the Create built-in function and the constructor for that class, then added to the RuleDefn object with the AddRuleExpression method.
The following example creates a cube that uses the Analytic Calculation Engine built-in function AT.
Function AT_Cube /** AT Cube Rule **/ &Expected = "AT(GENERAL2, [GENERAL2:4], LOOKUPVALUES)"; &CubeName = "AT"; &FunCall = create PT_ANALYTICMODELDEFN:RuleExpressions:FunctionCall(&Constants.FuncCall_Type_Builtin, &Constants.FuncCall_Builtin_AT); &Constant = create PT_ANALYTICMODELDEFN:RuleExpressions:Constant(&Constants.Constant_Type_Literal, "GENERAL2"); &FunCall.AddArgument(&Constant); &MemberRefArgument = create PT_ANALYTICMODELDEFN:RuleExpressions:MemberReference("GENERAL2", "4"); &FunCall.AddArgument(&MemberRefArgument); &CubeArgument = create PT_ANALYTICMODELDEFN:RuleExpressions:Cube("LOOKUPVALUES"); &FunCall.AddArgument(&CubeArgument); &RuleDefn = create PT_ANALYTICMODELDEFN:RuleDefn(""); &CubeDefn = &Model.GetCube(&CubeName); &RuleDefn.AddRuleExpression(&FunCall); &RuleDefn.GenerateRule(); &CubeDefn.SetRule(&RuleDefn); If ( Not (Exact(&RuleDefn.RuleString, &Expected))) Then &Model.Save(); Error ("Rule Experession API Failed [Cube " | &CubeName | " Rule]"); End-If; End-Function;
All the Analytic Calculation Engine Metadata classes throw PeopleCode exceptions for any fatal error that occurs in the execution of the operation. PeopleSoft recommends enclosing your analytic model programs in try-catch statements. This way, if your program catches the exception, the message set and message number that are associated with the exception object indicate the error.
See Also
Every PeopleSoft Analytic Calculation Engine metadata object is declared as its own data type, that is, AnalyticModelDefn objects are declared as type AnalyticModelDefn, CubeDefn objects are declared as type CubeDefn, and so on.
The Analytic Calculation Engine Metadata objects can only be instantiated from PeopleCode.
These objects can be used anywhere you have PeopleCode, that is, in a PeopleSoft Application Engine program, an application class, record field PeopleCode, and so on.
Analytic Calculation Engine Metadata objects can be of scope Local, Component or Global.
The Analytic Calculation Engine metadata classes are not built-in classes, like Rowset, Field, Record, and so on. They are application classes. Before you can use these classes in your PeopleCode program, you must import them to your program.
An import statement names either all the classes in a package or one particular application class. For importing the Analytic Calculation Engine metadata classes, PeopleSoft recommends that you import all the classes in the application package.
The application package PT_ANALYTICMODELDEFN contains the following subclasses:
AnalyticModelDefn
CubeCollectionDefn
CubeDefn
DimensionDefn
ExplicitDimSet
OrganizerDefn
RuleDefn
UserFunctionDefn
Additionally, there is a sub-application package, RuleExpressions, that contains classes used to build a rule as object instead of as a simple string. This package contains the following classes:
Assignment
Comparison
Constant
Constants
Cube
ExpressionBlock
FunctionCall
MemberReference
Operation
RuleExpression
Variable
The import statements that you should use should be as follows:
import PT_ANALYTICMODELDEFN:*; import PT_ANALYTICMODELDEFN:RuleExpressions:*;
Using the asterisks after the package name makes all the application classes directly contained in the named package available.
See Also
After you've imported the Analytic Calculation Engine metadata classes, you need to instantiate an instance of the AnalyticModelDefn class, using the constructor for that class and the Create function. After you create the object, you must populate it using either the Get or Create method.
The following example creates an AnalyticModelDefn object from the QE_ALLFUNCTION analytic model definition.
import PT_ANALYTICMODELDEFN:*; Local AnalyticModelDefn &Model; &Model = create AnalyticModelDefn("QE_ALLFUNCTION");
See Also
Analytic Calculation Engine Metadata Classes Constructor
You must use the constructor for the AnalyticModelDefn class to instantiate an instance of that class. All other metadata objects are instantiated from this class.
Syntax
AnalyticModelDefn(ModelName)
Description
Use the AnalyticModelDefn constructor to create an AnalyticModelDefn object.
Once the AnalyticModelDefn object is created, you can then execute either the Get or Create methods to ‘instantiate’ the model.
Note. The Delete and Rename methods can only be executed before a model is ‘instantiated’.
Parameters
ModelName |
Specify the name of an analytic model definition. |
Returns
An AnalyticModelDefn object.
Example
&Model = create AnalyticModelDefn("QE_ALLFUNCTION");
See Also
Use the AnalyticModelDefn class to view or manipulate an analytic model definition that's already been created in PeopleSoft Application Designer, or to create a new definition.
See Also
Enterprise PeopleTools 8.49 PeopleBook: PeopleSoft Analytic Calculation Engine
The following section discusses the AnalyticModelDefn class methods. The methods are discussed in alphabetical order.
Syntax
AddCube(CubeName)
Description
Use the AddCube method to add a new cube to the analytic model definition. This method fails if the cube specified by CubeName already exists.
Parameters
CubeName |
Specify the name of a new cube that you want to add to the analytic model. |
Returns
A CubeDefn object.
See Also
CopyCube, DeleteCube, GetCube, GetCubeNames, RenameCube.
Syntax
AddCubeCollection(CubeCollectionName)
Description
Use the AddCubeCollection method to add a new cube collection to the analytic model definition. This method fails if CubeCollectionName already exists.
Parameters
CubeCollectionName |
Specify the name of a new cube collection that you want to add to the analytic model definition. |
Returns
A CubeCollectionDefn object.
See Also
CopyCubeCollection, DeleteCubeCollection, GetCubeCollection, RenameCubeCollection.
Syntax
AddDimension(DimName)
Description
Use the AddDimension method to add a new dimension to the analytic model. This method fails if the specified dimension already exists.
When you add a dimension to a cube, the dimension is also automatically added to any cube collections that already contain the cube.
Parameters
DimName |
Specify the name of the dimension you want to add. This must be a new dimension. |
Returns
A DimensionDef object.
See Also
CopyDimension, DeleteDimension, GetDimension.
Syntax
AddExplicitDimensionSet(ExplicitDimSetName)
Description
Use the AddExplicitDimensionSet method to add a new explicit dimension set to the analytic model. This method fails if the specified explicit dimension set already exists.
Parameters
ExplicitDimSetName |
Specify the name of the explicit dimension you want to add. This must be a new explicit dimension. |
Returns
An ExplicitDimensionSet object.
See Also
GetExplicitDimensionSet, DeleteExplicitDimensionSet, CopyExplicitDimensionSet, GetExplicitDimensionSetNames, RenameExplicitDimensionSet.
Syntax
AddOrganizer(OrganizerName)
Description
Use the AddOrganizer method to add a new organizer to the analytic model. This method fails if the organizer specified by OrganizerName already exists.
Parameters
OrganizerName |
Specify the name of the organizer you want to add. |
Returns
An OrganizerDefn object.
See Also
DeleteOrganizer, GetOrganizer, GetOrganizerNames, RenameOrganizer.
Syntax
AddUserFunction(UserFunctionName)
Description
Use the AddUserFunction method to add a new user function to the analytic model. This method fails if the user function specified by UserFunction already exists.
Parameters
UserFunctionName |
Specify the name of the new user function that you want to add. |
Returns
A UserFunction object.
See Also
CopyUserFunction, DeleteUserFunction, GetUserFunction, GetUserFunctionNames, RenameUserFunction.
Syntax
CopyCube(CubeName, NewCubeName)
Description
Use the CopyCube method to copy the specified cube to the new cube. This method fails if the cube specified by CubeName already exists.
Parameters
CubeName |
Specify the name of the cube that you want to copy. |
NewCubeName |
Specify the name of the new cube that you want to create. |
Returns
A CubeDefn object.
See Also
AddCube, AddCube, GetCube, GetCubeNames, RenameCube.
Syntax
CopyCubeCollection(CubeCollectionName, NewCubeCollectionName)
Description
Use the CopyCubeCollection method to copy the specified cube collection to a new collection. If the new cube collection specified by NewCubeCollectionName already exists, this method fails.
Parameters
CubeCollectionName |
Specify the name of the cube collection that you want to copy. |
NewCubeCollectionName |
Specify the name you want for the new cube collection. |
Returns
A CubeCollectionDefn object.
See Also
AddCubeCollection, DeleteCubeCollection, GetCubeCollection, GetCubeCollectionNames, RenameCubeCollection.
Syntax
CopyDimension(DimName, NewDimName)
Description
Use the CopyDimension method to copy the dimension specified by DimName to a new dimension. If the dimension specified by NewDimName already exists, this method fails.
Parameters
DimName |
Specify the name of the dimension that you want to copy. |
NewDimName |
Specify the name of the new dimension that you want the data copied to. |
Returns
A DimensionDefn object.
See Also
AddDimension, DeleteDimension, RenameDimension.
Syntax
CopyExplicitDimensionSet(ExplicitDimSetName, NewExplicitDimSetName)
Description
Use the CopyExplicitDimensionSet method to copy the explicit dimension set specified by ExplicitDimSetName to a new explicit dimension set. If the explicit dimension set specified by NewExplicitDimSetName already exists, this method fails.
Parameters
ExplicitDimSetName |
Specify the name of the explicit dimension set that you want to copy. |
NewExplicitDimSetName |
Specify the name of the new explicit dimension set that you want the data copied to. |
Returns
An ExplicitDimensionSet object.
See Also
RenameExplicitDimensionSet, AddExplicitDimensionSet, DeleteExplicitDimensionSet, GetExplicitDimensionSet, GetExplicitDimensionSetNames.
Syntax
CopyTo(NewModelName)
Description
Use the CopyTo method to copy the AnalyticModelDefn object to a new analytic model specified by NewModelName. If the model set specified by NewModelName already exists, this method fails.
Parameters
NewModelName |
Specify the name of a new analytic model definition that you want to create. |
Returns
An AnalyticModelDefn object.
See Also
Create, Delete, Get, Rename, Save.
Syntax
CopyUserFunction(UserFunctionName, NewUserFunctionName)
Description
Use the CopyUserFunction method to copy the user function specified by UserFunctionName to a new user function. If the user function specified by NewUserFunctionName already exists, this method fails.
Parameters
UserFunctionName |
Specify the name of the user function that you want to copy. |
NewUserFunctionName |
Specify the name of the new user function that you want to add. |
Returns
A UserFunctionDefn object.
See Also
AddUserFunction, DeleteUserFunction, GetUserFunction, GetUserFunctionNames, RenameUserFunction.
Syntax
Create()
Description
Use the Create method to create, and instantiate, a new model. If you save the new model after you create it, you can then access it in PeopleSoft Application Designer as an analytic model definition.
If the model already exists, an exception is thrown.
Parameters
None.
Returns
None.
See Also
Syntax
Delete()
Description
Use the Delete method to delete the analytic model executing the method.
You can only use this method on a closed analytic model definition, that is, before you use a Get or Create method.
Warning! The delete occurs immediately, that is, the analytic model definition is removed from the database. Only use this method if you're certain you want to delete the definition.
If this model is used by any existing analytic type definition, this method fails.
Parameters
None.
Returns
None.
See Also
CopyTo, Create, Get, Rename, Save.
Syntax
DeleteCube(CubeName, ForceDelete)
Description
Use the DeleteCube method to delete the cube specified by CubeName.
Parameters
CubeName |
Specify the name of the cube you want to delete from the analytic model. |
ForceDelete |
Specify if the cube should always be deleted. This parameter takes a boolean value. If you specify ForceDelete as false, and the cube is used by another part (such as a cube collection) this method fails. If you specify ForceDelete as true, and the cube is used by another part, the cube is still deleted. |
Returns
None.
See Also
AddCube, GetCube, GetCubeNames, RenameCube.
Syntax
DeleteCubeCollection(CubeCollectionName, ForceDelete)
Description
Use the DeleteCubeCollection method to delete the cube collection specified by CubeCollectionName.
Parameters
CubeCollectionName |
Specify the name of the cube collection that you want to delete from the analytic model. |
ForceDelete |
Specify if the cube collection should always be deleted. This parameter takes a boolean value. If you specify ForceDelete as false, and the cube collection is used by another part (such as an Organizer), this method fails. If you specify ForceDelete as true, and the cube collection is used by another part, the cube collection is still deleted. |
Returns
None.
See Also
AddCubeCollection, GetCubeCollection, GetCubeCollectionNames, RenameCubeCollection.
Syntax
DeleteDimension(DimensionName, ForceDelete)
Description
Use the DeleteDimension method to delete the dimension specified by DimensionName.
Parameters
DimensionName |
Specify the name of the dimension you want to delete. |
ForceDelete |
Specify if the dimension should always be deleted. This parameter takes a boolean value. If you specify ForceDelete as false, and the dimension is used by another part (such as a cube), this method fails. If you specify ForceDelete as true, and the dimension is used by another part, the dimension is still deleted. |
Returns
None.
See Also
AddDimension, CopyDimension, GetDimension, GetDimensionNames, RenameDimension.
Syntax
DeleteExplicitDimensionSet(ExplicitDimensionSetName, ForceDelete)
Description
Use the DeleteExplicitDimensionSet method to delete the explicit dimension set specified by ExplicitDimensionSetName.
Parameters
ExplicitDimensionSetName |
Specify the name of the explicit dimension set you want to delete. |
ForceDelete |
The value of this parameter is ignored in the current release. |
Returns
None.
See Also
AddExplicitDimensionSet, CopyExplicitDimensionSet, GetExplicitDimensionSet, GetExplicitDimensionSetNames, RenameExplicitDimensionSet.
Syntax
DeleteOrganizer(OrganizerName, ForceDelete)
Description
Use the DeleteOrganizer method to delete the organizer specified by OrganizerName.
Parameters
OrganizerName |
Specify the name of the organizer you want to delete. |
ForceDelete |
This value is ignored in the current release. |
Returns
None.
See Also
AddOrganizer, GetOrganizer, GetOrganizerNames, RenameOrganizer.
Syntax
DeleteUserFunction(UserFunctionName, ForceDelete)
Description
Use the DeleteUserFunction method to delete the user function specified by UserFunctionName.
Parameters
UserFunctionName |
Specify the name of the user function you want to delete. |
ForceDelete |
Specify if the user function should always be deleted. This parameter takes a boolean value. If you specify ForceDelete as false, and the user function is used by another part, this method fails. If you specify ForceDelete as true, and the user function is used by another part, the user function is still deleted. |
Returns
None.
See Also
AddUserFunction, CopyUserFunction, GetUserFunction, GetUserFunctionNames, RenameUserFunction.
Syntax
Get()
Description
Use the Get method to instantiate an instance of the analytic model.
If the model doesn't exist, an exception is thrown.
Parameters
None.
Returns
None.
See Also
CopyTo, Create, Delete, Rename, Save.
Syntax
GetCube(CubeName)
Description
Use the GetCube method to return a reference to the cube specified by CubeName. This method fails if the cube specified by CubeName doesn't exist.
Parameters
CubeName |
Specify the name of the cube that you want a reference to. |
Returns
A CubeDefn object.
See Also
AddCube, CopyCube, DeleteCube, GetCubeNames, RenameCube.
Syntax
GetCubeCollection(CubeCollectionName)
Description
Use the GetCubeCollection method to return a reference to a cube collection. This method fails if the cube collection specified by CubeCollectionName doesn't exist.
Parameters
CubeCollection |
Specify the name of the cube collection you want a reference to. |
Returns
A CubeCollectionDefn object.
See Also
AddCubeCollection, CopyCubeCollection, DeleteCubeCollection, GetCubeCollection, GetCubeCollectionNames, RenameCubeCollection.
Syntax
GetCubeCollectionNames()
Description
Use the GetCubeCollectionNames method to return an array of strings containing all the names of the cube collections associated with this analytic model.
Parameters
None.
Returns
An array of string.
See Also
AddCubeCollection, CopyCubeCollection, DeleteCubeCollection, GetCubeCollection, RenameCubeCollection.
Syntax
GetCubeNames()
Description
Use the GetCubeNames method to return an array of strings containing all the names of the cubes associated with this analytic model.
Parameters
None.
Returns
An array of string.
See Also
AddCube, CopyCube, DeleteCube, GetCube, RenameCube.
Syntax
GetDimension(DimName)
Description
Use the GetDimension method to return a reference to the dimension specified by DimName. This method fails if the dimension specified by DimName doesn't exist.
Parameters
DimName |
Specify the name of the dimension that you want a reference to. |
Returns
A DimensionDefn object.
See Also
AddDimension, CopyDimension, DeleteDimension, GetDimensionNames, RenameDimension.
Syntax
GetDimensionNames()
Description
Use the GetDimensionNames method to return an array of string containing the names of all the dimensions associated with the analytic model.
Parameters
None.
Returns
An array of string.
See Also
AddDimension, CopyDimension, DeleteDimension, DeleteDimension, GetDimension, RenameDimension.
Syntax
GetExplicitDimensionSet(ExplicitDimSetName)
Description
Use the GetExplicitDimensionSet method to return a reference to the explicit dimension set specified by ExplicitDimSetName. This method fails if the explicit dimension set specified by ExplicitDimSetName doesn't exist.
Parameters
ExplicitDimSetName |
Specify the name of the explicit dimension set that you want a reference to. |
Returns
An ExplicitDimensionSet object.
See Also
AddExplicitDimensionSet, CopyExplicitDimensionSet, DeleteExplicitDimensionSet, GetExplicitDimensionSetNames.
Syntax
GetExplicitDimensionSetNames()
Description
Use the GetExplicitDimensionSetNames method to return an array of string containing the names of all the explicit dimension sets associated with the analytic model.
Parameters
None.
Returns
An array of strings.
See Also
Syntax
GetOrganizer(OrganizerName)
Description
Use the GetOrganizer method to return a reference to the organizer specified by OrganizerName. This method fails if the organizer specified by OrganizerName doesn't exist.
Parameters
OrganizerName |
Specify the name of the organizer you want a reference to. |
Returns
An OrganizerDefn object.
See Also
AddOrganizer, DeleteOrganizer, GetOrganizerNames, RenameOrganizer.
Syntax
GetOrganizerNames()
Description
Use the GetOrganizerNames method to return an array of string containing the names of all the organizers associated with the analytic model.
Parameters
None.
Returns
An array of string.
See Also
AddOrganizer, DeleteOrganizer, GetOrganizer, RenameOrganizer.
Syntax
GetUserFunction(UserFunctionName)
Description
Use the GetUserFunction method to return a reference to the user function specified by UserFunctionName. This method fails if the user function specified by UserFunctionName doesn't exist.
Parameters
UserFunctionName |
Specify the name of a user function that you want a reference to. |
Returns
A UserFunctionDefn object
See Also
AddUserFunction, CopyUserFunction, DeleteUserFunction, GetUserFunctionNames, RenameUserFunction.
Syntax
GetUserFunctionNames()
Description
Use the GetUserFunctionNames method to return an array of string containing the names of all the user functions associated with the analytic model.
Parameters
None.
Returns
An array of string.
See Also
AddUserFunction, CopyUserFunction, DeleteUserFunction, GetUserFunction, RenameUserFunction.
Syntax
Rename(NewModelName)
Description
Use the Rename method to rename the analytic model.
You can only use this method on a closed analytic model definition, that is, before you use a Get or Create method.
Parameters
NewModelName |
Specify the new name of the model. |
Returns
None.
See Also
Syntax
RenameCube(CubeName, NewCubeName, ForceRename)
Description
Use the RenameCube method to rename the cube specified by CubeName to NewCubeName.
Parameters
CubeName |
Specify the name of the cube you want to rename. |
NewCubeName |
Specify the new name for the cube. |
ForceRename |
Specify if the cube should always be renamed. This parameter takes a boolean value. If you specify ForceRename as false, and the cube is used by another part (such as a cube collection) this method fails. If you specify ForceRename as true, and the cube is used by another part, the cube is still renamed. |
Returns
None.
See Also
AddCube, CopyCube, DeleteCube, GetCube, GetCubeNames.
Syntax
RenameCubeCollection(CubeCollectionName, NewCubeCollectionName, ForceRename
Description
Use the RenameCubeCollection method to rename the cube collection specified by CubeCollectionName to the new name NewCubeCollectionName
Parameters
CubeCollectionName |
Specify the name of the cube collection that you want to rename. |
NewCubeCollectionName |
Specify the new name of the cube collection. |
ForceRename |
Specify if the cube collection should always be renamed. This parameter takes a boolean value. If you specify ForceRename as false, and the cube collection is used by another part (such as an organizer) this method fails. If you specify ForceRename as true, and the cube collection is used by another part, the cube collection is still renamed. |
Returns
None.
See Also
AddCubeCollection, CopyCubeCollection, DeleteCubeCollection, GetCubeCollection, GetCubeCollectionNames.
Syntax
RenameDimension(DimName, NewDimName, ForceRename)
Description
Use the RenameDimension method to rename the dimension specified by DimName to the new name NewDimName.
Parameters
DimName |
Specify the name of the dimension you want to rename. |
NewDimName |
Specify the new name of the dimension. |
ForceRename |
Specify if the dimension should always be renamed. This parameter takes a boolean value. If you specify ForceRename as false, and the dimension is used by another part (such as a cube) this method fails. If you specify ForceRename as true, and the dimension is used by another part, the dimension is still renamed. |
Returns
None.
See Also
AddDimension, CopyDimension, DeleteDimension, GetDimension, GetDimensionNames.
Syntax
RenameExplicitDimensionSet(ExplicitDimSetName, NewExplicitDimSetName, ForceRename)
Description
Use the RenameExplicitDimensionSet method to rename the explicit dimension set specified by ExplicitDimSetName to the new name NewExplicitDimSetName.
Parameters
ExplicitDimSetName |
Specify the name of the explicit dimension set you want to rename. |
NewExplicitDimSetName |
Specify the new name of the explicit dimension set. |
ForceRename |
The value for this parameter is ignored in the current release. |
Returns
None.
See Also
AddExplicitDimensionSet, CopyExplicitDimensionSet, DeleteExplicitDimensionSet, GetExplicitDimensionSet, RenameExplicitDimensionSet.
Syntax
RenameOrganizer(OrganizerName, NewOrganizerName, ForceRename)
Description
Use the RenameOrganizer method to rename the organizer specified by OrganizerName to the new name NewOrganizerName.
Parameters
OrganizerName |
Specify the name of the organizer you want to rename. |
NewOrganizerName |
Specify the new name for the organizer. |
ForceRename |
The value for this parameter is ignored in the current release. |
Returns
None.
See Also
AddOrganizer, DeleteOrganizer, GetOrganizer, GetOrganizerNames.
Syntax
RenameUserFunction(UserFunctionName, NewUserFunctionName, ForceRename)
Description
Use the RenameUserFunction method to rename the user function specified by UserFunctionName to the new name NewUserFunctionName.
Parameters
UserFunctionName |
Specify the name of the user function you want to rename. |
NewUserFunctionName |
Specify the new name for the user function. |
ForceRename |
Specify if the user function should always be renamed. This parameter takes a boolean value. If you specify ForceRename as false, and the user function is used by another part this method fails. If you specify ForceRename as true, and the user function is used by another part, the user function is still renamed. |
Returns
None.
See Also
AddUserFunction, CopyUserFunction, DeleteUserFunction, GetUserFunction, GetUserFunctionNames.
Syntax
Save()
Description
Use the Save method to save any changes to the analytic model definition to the database. If the saved model is valid, the value of the IsValid property is set to true, if it is not valid, it is set to false.
The Messages property is populate with messages from the validation that occurs with the save.
Parameters
None.
Returns
None.
See Also
Syntax
Validate()
Description
Use the Validate method to validate the analytic model definition. This method returns true if the model successfully validates. If this method returns false, the detailed error messages are available through the Messages property.
The IsValid property is not set with this method. The Save method sets the IsValid property.
Parameters
None.
Returns
A boolean value: true if the analytic model definition validates successfully, false otherwise.
See Also
Create, Save, Messages, IsValid.
The following section discusses the AnalyticModelDefn class properties. The properties are discussed in alphabetical order.
Description
Use this property to specify whether warnings occur when there are circular dependencies as rules are added. This property takes a boolean value: true if warnings should occur, false otherwise. The default value for this property is false.
This property is read-write.
Description
Use this property to specify the description of the analytic model. This property takes a string value.
This property is read-write.
Description
This property indicates if the analytic model is valid, that is, if it would successfully load.
This property is read-only.
See Also
Description
Use this property to specify the long description of the analytic model definition. This property takes a string value.
This property is read-write.
Description
This property specifies the maximum number of value changes for the analytic model
This property takes a float value. The default value is 0.
This property is read-write.
See Also
Creating Analytic Model Definitions
Description
Use this property to specify the maximum number of iterations for the analytic model.
This property take an integer value. The default value is 100.
This property is read-write.
See Also
Designing and Editing Analytic Models
Description
This property returns a multi-dimensional array of any that contains the messages that occurred during execution of the Validate or Save methods. This array is only populated after the Validate or Save method has completed successfully.
The first dimension contains the message set number. The second dimension contains the message number. The third dimension contains the number of parameters in that message. The subsequent dimensions contain the values for the parameters. The maximum number of possible dimensions is 8.
This property is read-only.
See Also
Description
This property indicates the name of the analytic model.
This property is read-only.
See Also
Description
Use this property to specify if the analytic model should resolve circular dependencies through iteration. This property takes a boolean value: true if the dependencies should be resolved, false otherwise. The default value is false.
This property is read-write.
Use the DimensionDefn class to access a dimension that's associated with an analytic model. You instantiate an object of this class using the following AnalyticModelDefn methods:
AddDimension
CopyDimension
GetDimension
The following section discusses the DimensionDefn class properties. The properties are discussed in alphabetical order.
Description
This property indicates the sequence number of this dimension used during aggregation of the analytic model
This property is read-only..
Description
Use this property to specify the name of a user function that can be used to override the default aggregation for this dimension.
This property is read-write.
Description
Use this property to specify additional notes about the dimension.
This property is read-write.
Description
This property indicates the name of the dimension.
This property is read-only.
See Also
GetDimensionNames, RenameDimension.
Description
Use this property to specify a field value that is used at runtime to host the total value for this dimension. If a total isn't applicable, this property has no value.
This property is read-write.
Use the ExplicitDimensionSet class to access an explicit dimension set associated with an analytic model. You instantiate an object of this class using one of the following AnalyticModelDefn methods:
AddExplicitDimensionSet
CopyExplicitDimensionSet
GetExplicitDimensionSet
You can also use the GetExplicitDimensionSetNames to return an array containing the names of all the explicit dimension sets associated with the analytic model.
The following section discusses the ExplicitDimensionSet class methods. The methods are discussed in alphabetical order.
Syntax
AttachDimension(DimName)
Description
Use the AttachDimension method to attach a dimension to an explicit dimension set.
Parameters
DimName |
Specify the name of the dimension you want to attach. |
Returns
None.
See Also
Syntax
DetachDimension(DimName)
Description
Use the DetachDimension method to detach a dimension from an explicit dimension set.
Parameters
DimName |
Specify the name of the dimension that you want to detach. |
Returns
None.
See Also
Syntax
GetDimensionNames()
Description
Use the GetDimensionNames method to return an array of string that contains the names of all the dimensions associated with the ExplicitDimensionSet.
Parameters
None.
Returns
An array of string.
See Also
AttachDimension, DetachDimension.
The following section discusses the ExplicitDimensionSet class properties. The properties are discussed in alphabetical order.
Description
The Name property returns the name of the explicit dimension set as a string.
This property is read-only.
Description
This property returns the sequence number of the explicit dimension set.
This property is read-only.
Use the CubeDefn class to access a cube associated with an analytic model. You instantiate an object of this class using the following AnalyticModelDefn methods:
AddCubeDefn
CopyCubeDefn
GetCubeDefn
The following section discusses the CubeDefn class methods. The methods are discussed in alphabetical order.
Syntax
AttachDimension(DimName)
Description
Use the AttachDimension method to attach an existing dimension specified by DimName to the cube.
Parameters
DimName |
Specify the name of the dimension that you want to add. |
Returns
None.
See Also
DetachDimension, GetDimensionNames, UsesDimension.
Syntax
DetatchDimension(DimName)
Description
Use the DetachDimension method to detach the dimension specified by DimName from the cube.
Parameters
DimName |
Specify the name of the dimension that you want to detach from the cube. |
Returns
None.
See Also
AttachDimension, GetDimensionNames, UsesDimension.
Syntax
GetCauses(CauseType)
Description
Any cube that affects another cube is a cause of that cube. Use the GetCauses method to return a list of all the other cubes that are the causes for this cube.
The cube names are returned in an array of string.
Parameters
CauseType |
Specify the type of causes you want returned. |
Value |
Description |
AnalyticModel_DirectCauses |
Only return direct causes. |
AnalyticModel_AllCauses |
Return all cubes that are causes for this cube, both direct and indirect. |
AnalyticModel_AllInputs |
Return all cubes that have input to this cube. |
Returns
An array of string.
See Also
Understanding Causes and Inputs
Syntax
GetCircularDeps(DimName)
Description
Use the GetCircularDeps method to return all cubes that have circular dependencies based on the dimension specified by DimName.
The cube names are returned in an array of string.
Parameters
DimName |
Specify the name of the dimension that you want to find circular dependencies for. |
Returns
An array of string.
See Also
Enterprise PeopleTools 8.49 PeopleBook: PeopleSoft Analytic Calculation Engine
Syntax
GetDimensionAggregate(DimName)
Description
Use the GetDimensionAggregate method to return the name of the user function used for the aggregate for the dimension specified by DimName.
Parameters
DimName |
Specify the name of the dimension that you want the aggregate user function. |
Returns
A string.
See Also
Syntax
GetEffects(EffectType)
Description
Any cube that is affected by another cube is an effect of that cube. Use the GetEffects method to return a list of all the cubes affected by this cube.
The list of cubes is returned as an array of string.
Parameters
EffectType |
Specify the type of effects you want returned. |
Value |
Description |
AnalyticModel_DirectEffects |
Only return cubes that are a direct effect on this cube. |
AnalyticModel_AllEffects |
Return all cubes that are an effect on this cube. |
Returns
An array of string.
See Also
Enterprise PeopleTools 8.49 PeopleBook: PeopleSoft Analytic Calculation Engine
Syntax
GetDimensionNames()
Description
Use the GetDimensionNames method to return an array of string containing the names of all the dimensions associated with the cube.
Parameters
None.
Returns
An array of string.
See Also
AttachDimension, DetachDimension.
Syntax
GetRule()
Description
Use the GetRule method to get a reference to a RuleDefn object that represents the rule for this cube.
Parameters
None.
Returns
A RuleDefn object.
See Also
Syntax
SetDimensionAggregate(DimName, UserFunctionName)
Description
Use the SetDimensionAggregate method to specify the user function to be used for the aggregate for the dimension DimName.
Parameters
DimName |
Specify the name of the dimension for which you want to set the aggregate. |
UserFunctionName |
Specify the name of the user function to be used as the aggregate function. |
Returns
None.
See Also
Syntax
SetRule(&RuleDefn)
Description
Use the SetRule method to specify a RuleDefn object to be used as the rule for this cube.
Parameters
&RuleDefn |
Specify an already instantiated RuleDefn object that you want to associate with this cube. |
Returns
None.
See Also
Syntax
UsesDimension(DimName)
Description
Use the UsesDimension method to determine if the dimension specified by DimName is used by this cube.
Parameters
DimName |
Specify the name of the dimension that you want to check for. |
Returns
A boolean value: true if the dimension is used, false otherwise.
See Also
AttachDimension, DetachDimension, GetDimensionNames.
The following section discusses the CubeDefn class properties. The properties are discussed in alphabetical order.
Description
Use this property to specify if the aggregate is calculated for this cube. This property takes a boolean value: true if the aggregate is calculated, false otherwise.
This property is read-write.
Description
Use this property to specify additional notes about the cube.
This property is read-write.
Description
This property indicates the number of dimensions associated with this cube.
This property is read-only.
Description
Use this property to specify the format of the cube. The values are:
Value |
Description |
AnalyticModel_Format_Number |
The format is of type number. |
AnalyticModel_Format_Date |
The format is of type date. |
AnalyticModel_Format_ Member |
The format is of type member. |
AnalyticModel_Format_Text |
The format is of type text. |
This property is read-write.
Description
Use this property to specify if the cube is a virtual cube, that is, if it doesn't store data. This property takes a boolean value: true if the cube is a virtual cube, false otherwise.
This property is read-write.
Description
This property specifies the name of the cube.
This property is read-only.
Description
Use this property to specify the dimension name for cubes that have a format of member.
This property is only valid when a cube has a format of member.
This property is read-write.
See Also
Enterprise PeopleTools 8.49 PeopleBook: PeopleSoft Analytic Calculation Engine
Use the CubeCollectionDefn class to access cube collections associated with an analytic model. You instantiate an object of this class using the following AnalyticModelDefn class methods:
AddCubeCollection
CopyCubeCollection
GetCubeCollection
The following section discusses the CubeCollectionDefn class methods. The methods are discussed in alphabetical order.
Syntax
AttachCube(CubeName)
Description
Use the AttachCube method to attach the existing cube specified by CubeName to the cube collection.
You should only specify cube collections comprised of derived/work records as the main record for a presentation cube collection.
Parameters
CubeName |
Specify the name of the cube you want to attach. |
Returns
None.
See Also
Syntax
DetachCube(CubeName)
Description
Use the DetachCube to detach the cube specified by CubeName from the cube collection.
Parameters
CubeName |
Specify the name of the cube that you want to detach. |
Returns
None.
See Also
Syntax
GetAggregateMapping(PartName, IsCube)
Description
Use the GetAggregateMapping method to return the aggregate mapping field specified by the part PartName.
Parameters
PartName |
Specify the part name for which you want the aggregate mapping field name. |
IsCube |
Specify whether the part is a cube or not. This parameter takes a boolean value, true if the part is a cube, false otherwise. |
Returns
A string.
See Also
GetFieldMapping, GetPersistAggregate, SetAggregateMapping, SetFieldMapping, SetPersistAggregate.
Syntax
GetCubeNames()
Description
Use the GetCubeNames method to return an array of strings containing all the names of the cubes associated with this cube collection.
Parameters
None.
Returns
An array of string.
See Also
AddCube, CopyCube, DeleteCube, GetCube, RenameCube.
Syntax
GetDimensionNames()
Description
Use the GetDimensionNames method to return an array of string containing the names of all the dimensions associated with the cube collection.
The dimension names are returned in an array of string.
Parameters
None.
Returns
An array of string.
See Also
AttachDimension, DetachDimension.
Syntax
GetDimSort(DimensionName)
Description
Use the GetDimSort method return the sorting keys used for the dimension.
The sorting keys are returned as an array of any.
The first string is either true or false. If the first string is true it indicates that the dimension is sorted by the names of the members in the dimension.
The second string then is either true or false, indicating whether the sort is ascending (or descending). If the first string is false it indicates that the dimension is sorted by keys, which are the specified by the other strings in the array. The keys are names of cubes. The strings are as follows:
Ascend1
CubeName1
Ascend2
CubeName2
Ascend3
CubeName3
Parameters
DimensionName |
Specify the name of the dimension for which you want the sorting keys. |
Returns
An array of any.
See Also
Syntax
GetFieldMapping(PartName, IsCube)
Description
Use the GetFieldMapping method to return the name of the mapped field name for the part specified by PartName.
Parameters
PartName |
Specify the name of the part for which you want the mapped field name. |
IsCube |
Specify whether this part is a cube or not. This parameter takes a boolean value: true if the part is a cube, false otherwise. |
Returns
A string.
See Also
GetAggregateMapping, SetFieldMapping, SetAggregateMapping.
Syntax
GetFilter(DimensionName)
Description
Use the GetFilter method to return the name of the user function used as a filter for the dimension specified by DimensionName.
Parameters
DimensionName |
Specify the name of the dimension for which you want the filter name. |
Returns
A string.
See Also
Syntax
GetPersistAggregate(DimensionName)
Description
Use the GetPersistAggregate method to return the value for the persist aggregate for the dimension specified by DimensionName.
Parameters
DimensionName |
Specify the name of the dimension for which you want to find the persist aggregate value. |
Returns
An integer, which is one of the following values:
Value |
Description |
AnalyticModel_AggrType_Root |
The persist aggregate type is Root, that is, only the root node's data is saved to the database. |
AnalyticModel_AggrType_All |
The persist aggregate type is All, that is, save all of the dimension's aggregate data to the database. |
AnalyticModel_AggrType_ None |
The persist aggregate type is None, that is, do not save any of the dimension's aggregate data to the database. |
See Also
GetAggregateMapping, GetFieldMapping, SetAggregateMapping, SetFieldMapping, SetPersistAggregate.
Syntax
SetAggregateMapping(PartName, IsCube, AggregateFieldName)
Description
Use the SetAggregateMapping method to specify an aggregate field for the part specified by PartName.
You can map a field to only one data cube or dimension within one cube collection.
Parameters
PartName |
Specify the name of the part for which you want to add an aggregate field. |
IsCube |
Specify whether the part is a cube. This parameter takes a boolean value, true if the part is a cube, false otherwise. |
AggregateFieldName |
Specify the name of the field to be used to hold the aggregate value. |
Returns
A string containing the name of the field that contains the aggregate value.
See Also
SetPersistAggregate, GetFieldMapping, GetPersistAggregate, SetFieldMapping, SetPersistAggregate.
Syntax
SetDimSort(DimName, IsAscending [, CubeName1, IsAscending2, CubeName2, IsAscending3, CubeName3])
Description
Use the SetDimSort method to specify the sorting order for the dimension.
If CubeName1 is an empty string, the dimension is sorted by the names of the members of the dimension, and the other parameters are not used.
If CubeName1 is not an empty string, the dimension is sorted by cubes, as specified by the other parameters.
The boolean parameter IsAscending defines whether sorting should be in ascending or descending order. Up to three sort keys may be specified. CubeName1 is the primary sort key. CubeName2 is used to sub-sort any members that have the same key value under CubeName1, and so on.
Parameters
DimensionName |
Specify the name of the dimension that you would like to specify a sort order for. |
IsAscending |
Specify if the dimension should be sorted in ascending or descending order. This parameter takes a boolean value: true if the sort should be ascending, false if it should be descending. |
CubeName1 |
Specify whether the dimension is to be sorted by members or by cubes. If the dimension is to be sorted by members, specify a null string for this parameter. If the dimension is to be sorted by cubes, specify a cube name. |
IsAscending2 |
Specify if the sort for CubeName1 is in ascending or descending order. This parameter takes a boolean value: true if the sort is ascending, false if its descending. |
CubeName2 |
Specify the name of a cube to be used to sub-sort the primary sort specified by CubeName1. |
IsAscending3 |
Specify if the sort for CubeName2 is in ascending or descending order. This parameter takes a boolean value: true if the sort is ascending, false if its descending. |
CubeName3 |
Specify the name of a cube to be used to sub-sort the primary sort specified by CubeName2. |
Returns
None.
See Also
Syntax
SetFieldMapping(PartName, FieldName, IsCube)
Description
Use the SetFieldMapping method to specify the name of the main field used for mapping the part specified by PartName.
You can map a field to only one data cube or dimension within one cube collection.
Parameters
PartName |
Specify the name of the part for which you want to assign a mapping field. |
FieldName |
Specify the name of the field to be used for the field mapping. |
IsCube |
Specify whether or not the part is a cube. This parameter takes a boolean value: true if the part is a cube, false otherwise. |
Returns
None.
See Also
GetAggregateMapping, GetFieldMapping, GetPersistAggregate, SetAggregateMapping, SetPersistAggregate.
Syntax
SetFilter(DimensionName, UserFunctionName)
Description
Use the SetFilter method to specify the user function to be used as a filter for the dimension specified by DimensionName.
Parameters
DimensionName |
Specify the name of the dimension for which you want to set a filter. |
UserFunctionName |
Specify the name of a user function to be used as a filter for this dimension. |
Returns
None.
See Also
Syntax
SetPersistAggregate(DimensionName, AggregateType)
Description
Use the SetPersistAggregate to specify the value for the persist aggregate for the dimension specified by DimensionName.
Parameters
DimensionName |
Specify the name of the dimension for which you want to set the persist aggregate. |
AggregateType |
Specify the aggregate type. Values are: |
Value |
Description |
AnalyticModel_AggrType_Root |
The persist aggregate type is Root, that is, only the root node's data is saved to the database. |
AnalyticModel_AggrType_All |
The persist aggregate type is All, that is, save all of the dimension's aggregate data to the database. |
AnalyticModel_AggrType_ None |
The persist aggregate type is None, that is, do not save any of the dimension's aggregate data to the database. |
Returns
None.
See Also
GetAggregateMapping, GetFieldMapping, GetPersistAggregate, SetAggregateMapping, SetFieldMapping.
Syntax
UsesCube(CubeName)
Description
Use the UsesCube method to determine if the cube collection uses the cube specified by CubeName.
Parameters
CubeName |
Specify the name of the cube that you want to verify. |
Returns
A boolean value, true if the specified cube is part of the cube collection, false otherwise.
See Also
AttachCube, DetachCube, GetCubeNames.
Syntax
UsesDimension(DimensionName)
Description
Use the UsesDimension method to determine if the cube collection uses the dimension specified by DimensionName.
Parameters
DimensionName |
Specify the name of the dimension that you want to verify. |
Returns
A boolean value: true if the dimension is part of the cube collection, false otherwise.
See Also
The following section discusses the CubeCollectionDefn class properties. The properties are discussed in alphabetical order.
Description
Use this property to specify the name of the aggregate record associated with this cube collection. This property takes a string value.
This property is read-write.
Description
Use this property to specify additional notes about the cube collection.
This property is read-write.
Description
This property returns the number of cubes in the cube collection.
This property is read-only.
Description
This property returns the number of dimensions associated with this cube collection.
This property is read-only.
Description
This property returns the name of the cube collection as a string.
This property is read-only.
Description
Use this property to specify the name of the main record associated with the cube collection. This property takes a string value.
This property is read-write.
Use the UserFunctionDefn class to access the user functions that are associated with an analytic model. You instantiate an object of this class using the following AnalyticModelDefn class methods:
AddUserFunction
CopyUserFunction
GetUserFunction
In this section we discuss the UserFunctionDefn class methods. They are described in alphabetical order.
Syntax
GetRule()
Description
Use the GetRule method to return a RuleDefn object that represents the rule associated with this user function.
Parameters
None.
Returns
A RuleDefn object.
See Also
Syntax
SetRule(&Rule)
Description
Use the SetRule method to specify a rule defined by a RuleDefn object to be the rule for this user function.
Parameters
&Rule |
Specify an already instantiated RuleDefn object that you want to use as the rule for this user function. |
Returns
None.
The following section discusses the UserFunctionDefn class properties. The properties are discussed in alphabetical order.
Description
Use this property to specify additional notes about the user function.
This property is read-write.
Description
This property specifies the name of the user function.
This property is read-only.
Use the OrganizerDefn class to access the organizers that are associated with an analytic model. You instantiate an object of this class using the following AnalyticModelDefn class methods:
AddOrganizer
CopyOrganizer
GetOrganizer
The following section discusses the OrganizerDefn class methods. The methods are discussed in alphabetical order.
Syntax
AttachPart(PartName, PartType)
Description
Use the AttachPart method to attach the part specified by PartName to the organizer. The part must exist in the analytic model.
Parameters
PartName |
Specify the name of the part that you want to attach. |
PartType |
Specify the type of part that you want to attach. Values are: |
Value |
Description |
AnalyticModel_Dimension |
Attach a dimension. |
AnalyticModel_Cube |
Attach a cube. |
AnalyticModel_ CubeCollection |
Attach a cube collection. |
AnalyticModel_UserFunction |
Attach a user function. |
Returns
None.
See Also
DetachPart, GetPartNames, UsesPart.
Syntax
DetachPart(PartName, PartType)
Description
Use the DetachPart method to detach the part specified by PartName from the organizer.
Parameters
PartName |
Specify the name of the part that you want to detach. |
PartType |
Specify the type of the part that you want to detach. Valid values are: |
Value |
Description |
AnalyticModel_Dimension |
Detach a dimension. |
AnalyticModel_Cube |
Detach a cube. |
AnalyticModel_ CubeCollection |
Detach a cube collection. |
AnalyticModel_UserFunction |
Detach a user function. |
Returns
None.
See Also
AttachPart, GetPartNames, UsesPart.
Syntax
GetPartNames()
Description
Use the GetPartNames method to return a list of the names of the parts used by the organizer. The names are returned as an array of string.
Parameters
None.
Returns
An array of string.
See Also
AttachPart, DetachPart, UsesPart.
Syntax
UsesPart(PartName, PartType)
Description
Use the UsesPart method to determine if the organizer uses the part specified by PartName.
Parameters
PartName |
Specify the name of the part that you want to verify. |
PartType |
Specify the type of the part that you want to verify. Valid values are: |
Value |
Description |
AnalyticModel_Dimension |
A dimension. |
AnalyticModel_Cube |
A cube. |
AnalyticModel_ CubeCollection |
A cube collection. |
AnalyticModel_UserFunction |
A user function. |
Returns
A boolean value: true if the part is associated with the organizer, false otherwise.
See Also
AttachPart, DetachPart, GetPartNames.
The following section discusses the OrganizerDefn class properties. The properties are discussed in alphabetical order.
Description
Use this property to specify additional notes about the organizer.
This property is read-write.
Description
This property specifies the name of the organizer.
This property is read-only.
Use the RuleDefn class to access a rule that is associated with an analytic model. You instantiate an object of this class using the GetRule method for both the CubeDefn and UserFunctionDefn classes.
In this section, we discuss the RuleDefn class methods. The methods are described in alphabetical order.
Syntax
AddRuleExpression(&Expr)
Description
Use the AddRuleExpression method to add a rule expression to the rule. Use the classes in the RuleExpression subpackage to create the expression specified by &Expr.
After you have finished adding rule expressions to the rule, you need to use the GenerateRule method to generate the rule.
Parameters
&Expr |
Specify the rule expression that you want added to the rule definition. |
Returns
None.
See Also
Syntax
GenerateRule()
Description
Use the GenerateRule method to create the rule string for the rule that represents the current rule expressions that have been added using AddRuleExpression.
Parameters
None.
Returns
None.
See Also
The following describes the RuleDefn class property.
Description
This property specifies a string representation of the rule.
After the rule is returned using the GetRule method, this string represents the existing rule cube or user function.
After AddRuleExpression and GenerateRule are called, this is the string representation of the rule.
This property is read-only.
The RuleExpressions classes represents the different parts of the analytic calculation engine rule grammar. These objects are created using the Create built-in function and the constructor for that class, then added to the RuleDefn object with the AddRuleExpression method.
The following are the RuleExpressions classes:
Assignment
Comparison
Constant
Constants
Cube
ExpressionBlock
FunctionCall
MemberReference
Operation
RuleExpression
Variable
Note. The RuleExpression object is the object that the other objects are derived from. You should not create or use this object directly.
All of the constants used with the RuleExpression classes, such as FunctionCall, comparison, operation, and so on, are actually properties of the constants class. You must always instantiate an object of the constants class to use any constants in your program.
For example, the comparison class uses a constant to test whether two operands are equal. Use the following code to create a comparison testing this:
&Comparison = create Comparison(&Constants.Comparison_Type_Equal);
All of the properties for the constants class are listed with the classes that use them.
An assignment object represents an assignment statement in an analytic calculation rule.
Use the following to create an assignment object:
&Assignment = create Assignment();
The following is the method for the assignment class.
Syntax
GenerateRule()
Description
Use the GenerateRule method to return a string that contains the rule for this object.
Generally you wouldn’t use this method on the individual RuleExpression objects, but instead would use the GenerateRule method on the RuleDefn object.
Parameters
None.
Returns
A string.
See Also
In this section we discuss the assignment class properties. The properties are described in alphabetical order.
Description
Use the Expression property to specify the right-hand side of the assignment statement.
This property is read-write.
Description
Use the Variable property to specify the left-hand side of the assignment statement.
This property is read-write.
A comparison object represents a comparison statement in an analytic calculation rule.
Use the following to create a comparison class object:
&Comparison = create Comparison(&Constants.Comparison_Type);
Where Comparison_Type is one of the following:
Value |
Description |
Comparison_Type_Equal |
Compare if the value of Operand1 equals Operand2. |
Comparison_Type_Greater |
Compare if the value of Operand1 is greater than the value of Operand2. |
Comparison_Type_Less |
Compare if the value of Operand1 is less than the value of Operand2. |
Comparison_Type_GreaterEq |
Compare if the value of Operand1 is greater or equal to the value of Operand2. |
Comparison_Type_LessEq |
Compare if the value of Operand1 is less than or equal to the value of Operand2. |
Comparison_Type_NotEq |
Compare if the value of Operand1 is not equal to the value of Operand2. |
Specify Operand1 and Operand2 with the Operand1 and Operand2 comparison class properties.
The following code example creates a rule that compares if the first operand is greater than or equal to the second operand, then adds the rule using the AddArgument method.
&Comparison = create Comparison(&Constants.Comparison_Type_GreaterEq); &Constant = create Constant(&Constants.Constant_Type_Literal, "1000"); &Comparison.Operand1 = &Constant; &Constant = create Constant(&Constants.Constant_Type_Literal, "100"); &Comparison.Operand2 = &Constant; &FunCall.AddArgument(&Comparison);
The following is the comparison class method.
Syntax
GenerateRule()
Description
Use the GenerateRule method to return a string that contains the rule for this object.
Generally you wouldn’t use this method on the individual RuleExpression objects, but instead would use the GenerateRule method on the RuleDefn object.
Parameters
None.
Returns
A string.
See Also
In this section we discuss the comparison class properties. The properties are described in alphabetical order.
Description
Use this property to specify the RuleExpression object that is the first operand to be used in the comparison.
This property is read-write.
Description
Use this property to specify the RuleExpression object that is the second operand to be used in the comparison.
This property is read-write.
Description
This property returns the type of the comparison that was used to instantiate the comparison object.
The values are:
Value |
Description |
Comparison_Type_Equal |
Compare if the value of Operand1 equals Operand2. |
Comparison_Type_Greater |
Compare if the value of Operand1 is greater than the value of Operand2. |
Comparison_Type_Less |
Compare if the value of Operand1 is less than the value of Operand2. |
Comparison_Type_GreaterEq |
Compare if the value of Operand1 is greater than or equal to the value of Operand2. |
Comparison_Type_LessEq |
Compare if the value of Operand1 is less than or equal to the value of Operand2. |
Comparison_Type_NotEq |
Compare if the value of Operand1 is not equal to the value of Operand1. |
This property is read-only.
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");
The following is the constant class method.
Syntax
GenerateRule()
Description
Use the GenerateRule method to return a string that contains the rule for this object.
Generally you wouldn’t use this method on the individual RuleExpression objects, but instead would use the GenerateRule method on the RuleDefn object.
Parameters
None.
Returns
A string.
In this section we discuss the constant class properties. The properties are described in alphabetical order.
Description
This property returns the value of the Constant Type that was used to instantiate the constant class object.
This property is read-only.
See Also
Description
This property returns the value of the Constant Value that was used to instantiate the constant class object.
This property is read-only.
See Also
All of the constants used with the RuleExpression classes, such as FunctionCall, comparison, operation, and so on, are actually properties of the constants class. You must always instantiate an object of the constants class to use any constants in your program.
For example, the comparison class uses a constant to test whether two operands are equal. Use the following code to create a comparison testing this:
&Comparison = create Comparison(&Constants.Comparison_Type_Equal);
All of the properties for the constants class are listed with the classes that use them.
A cube object represents a cube statement in an analytic calculate engine rule.
Use the following to create a cube object.
&Assignment = create Cube("CubeName");
In the following section, we discuss the cube class methods. The methods are described in alphabetical order.
Syntax
AddIndex(&MemberReference)
Description
Use the AddIndex method to add a MemberReference object to the cube.
Parameters
&MemberReference |
Specify an already instantiated MemberReference object to be added to the cube. |
Returns
None.
See Also
Syntax
GenerateRule()
Description
Use the GenerateRule method to return a string that contains the rule for this object.
Generally you wouldn’t use this method on the individual RuleExpression objects, but instead would use the GenerateRule method on the RuleDefn object.
Parameters
None.
Returns
A string.
Syntax
GetIndexes()
Description
Use the GetIndexes method to return an array of MemberReference’s (indexes) for this cube. These MemberReferences are the MemberReferences that were added with the AddIndex method.
Parameters
None.
Returns
An array of MemberReference objects.
See Also
The following is the cube class property.
Description
This property indicates the name of the cube that was used to instantiate the cube object.
This property is read-only.
For some function, you need multi-statement nested expressions. You need to use the ExpressionBlock class to group these expressions. For example, all the statements inside of a FOR statement should be included in an expression block.
FOR(&Index, 1, PERIOD, SET(&Value, &Value + 1); SET(&countPl4, &countPl4 + 4); );
Use the following code to create an ExpressionBlock object:
&ExpressionBlock = create ExpressionBlock();
In the following section we discuss the ExpressionBlock class methods. The methods are described in alphabetical order.
Syntax
AddRuleExpression(&Expr)
Description
Use the AddRuleExpression method to add an expression to the expression block and the rule. Use the classes in the RuleExpression subpackage to create the expression specified by &Expr.
Note. As the rule string is generated, the system adds a ";" after each RuleExpression, except the last.
Parameters
&Expr |
Specify the rule expression that you want added to the expression block. |
Returns
None.
Syntax
GetRuleExpressions()
Description
Use the GetRuleExpressions to return an array of rule expression objects that have been added using the AddRuleExpression method.
Parameters
None.
Returns
An array of RuleExpression objects.
A FunctionCall object represents a function call statement in an analytic calculation engine rule.
Use the following code to create a FunctionCall object:
&Assignment = create FunctionCall(&Constants.Function_Call_Type, [&Constants.]Function_Call_Name);
Where Function_Call_Type can be one of the following:
Value |
Description |
FunctionCall_Type_Builtin |
Specifies that the function call is a PeopleSoft Analytic Calculation Engine built-in functions. In this instance, the function name must be prefaced with an already instantiated constants object. For the built-in function values used with Function_Call_Name, see below. |
FunctionCall_Type_UserFunc |
Specifies that the function call is a user function. The value specified for Function_Call_Name must be an already created user function defined in this analytic model. Specify this value as a string. |
When the Function_Call_Type is specified as Function_Call_Type_Builtin, the Function_Call_Name must be one of the following:
FunctionCall_Builtin_ABS
FunctionCall_Builtin_ACOS
FunctionCall_Builtin_ARGUMENTS
FunctionCall_Builtin_ASC
FunctionCall_Builtin_ASIN
FunctionCall_Builtin_AT
FunctionCall_Builtin_ATAN
FunctionCall_Builtin_BREAK
FunctionCall_Builtin_CASE
FunctionCall_Builtin_CHANGE
FunctionCall_Builtin_CHILDCOUNT
FunctionCall_Builtin_CHR
FunctionCall_Builtin_CONSOL
FunctionCall_Builtin_COS
FunctionCall_Builtin_CUBEID
FunctionCall_Builtin_CUBSUM
FunctionCall_Builtin_CUMAVG
FunctionCall_Builtin_DAVG
FunctionCall_Builtin_DAY
FunctionCall_Builtin_DCOUNT
FunctionCall_Builtin_DDB
FunctionCall_Builtin_DEC
FunctionCall_Builtin_DLOOKUP
FunctionCall_Builtin_DMAX
FunctionCall_Builtin_DMIN
FunctionCall_Builtin_DSUM
FunctionCall_Builtin_E
FunctionCall_Builtin_FIRST
FunctionCall_Builtin_FOR
FunctionCall_Builtin_FORCHILDREN
FunctionCall_Builtin_FORMEMBERS
FunctionCall_Builtin_FV
FunctionCall_Builtin_GROUPAVG
FunctionCall_Builtin_GROUPBY
FunctionCall_Builtin_GROUPMAX
FunctionCall_Builtin_GROUPMIN
FunctionCall_Builtin_GROUPSUM
FunctionCall_Builtin_GROW
FunctionCall_Builtin_IF
FunctionCall_Builtin_IFNPV
FunctionCall_Builtin_INC
FunctionCall_Builtin_INDICATE
FunctionCall_Builtin_INPUT
FunctionCall_Builtin_INSUBTREE
FunctionCall_Builtin_INTERCEPT
FunctionCall_Builtin_IRR
FunctionCall_Builtin_ISINPUT
FunctionCall_Builtin_LEFT
FunctionCall_Builtin_LEN
FunctionCall_Builtin_LN
FunctionCall_Builtin_LOWER
FunctionCall_Builtin_MATCH
FunctionCall_Builtin_MAX
FunctionCall_Builtin_MBR2TEXT
FunctionCall_Builtin_MEDIAN
FunctionCall_Builtin_MEMBER
FunctionCall_Builtin_MID
FunctionCall_Builtin_MIN
FunctionCall_Builtin_MOD
FunctionCall_Builtin_MONTH
FunctionCall_Builtin_NEXT
FunctionCall_Builtin_NPER
FunctionCall_Builtin_NUM2TEXT
FunctionCall_Builtin_NUMMEMBERS
FunctionCall_Builtin_NPV
FunctionCall_Builtin_PARAMETER
FunctionCall_Builtin_PARENT
FunctionCall_Builtin_PCT
FunctionCall_Builtin_PERCENTILE
FunctionCall_Builtin_PI
FunctionCall_Builtin_PMT
FunctionCall_Builtin_PREV
FunctionCall_Builtin_PREVSELF
FunctionCall_Builtin_PV
FunctionCall_Builtin_QUARTILE
FunctionCall_Builtin_RAND
FunctionCall_Builtin_RATE
FunctionCall_Builtin_REPLACE
FunctionCall_Builtin_RETURN
FunctionCall_Builtin_RIGHT
FunctionCall_Builtin_ROUND
FunctionCall_Builtin_SELF
FunctionCall_Builtin_SET
FunctionCall_Builtin_SIN
FunctionCall_Builtin_SLN
FunctionCall_Builtin_SLOPE
FunctionCall_Builtin_SQRT
FunctionCall_Builtin_STDEV
FunctionCall_Builtin_SYD
FunctionCall_Builtin_TAN
FunctionCall_Builtin_TEXT2MBR
FunctionCall_Builtin_TEXT2NUM
FunctionCall_Builtin_THIS
FunctionCall_Builtin_THISCUBE
FunctionCall_Builtin_TRUNC
FunctionCall_Builtin_UPPER
FunctionCall_Builtin_VAR
FunctionCall_Builtin_WHILE
FunctionCall_Builtin_YEAR
The following code creates a function call using a PeopleSoft Analytic Calculation Engine built-in function.
&FunCall = create FunctionCall(&Constants.FuncCall_Type_Builtin, &Constants.FuncCall_Builtin_ABS);
See Also
Using Built-in Functions in Analytic Models
In this section we discuss the FunctionCall class methods. The methods are described in alphabetical order.
Syntax
AddArgument(&RuleExpression)
Description
Use the AddArgument method to add an argument to this function call.
Parameters
&RuleExpression |
Specify an already instantiated rule expression object, such as a cube object. |
Returns
None.
Syntax
GenerateRule()
Description
Use the GenerateRule method to return a string that contains the rule for this object.
Generally you wouldn’t use this method on the individual RuleExpression objects, but instead would use the GenerateRule method on the RuleDefn object.
Parameters
None.
Returns
A string.
Syntax
GetArguments()
Description
Use the GetArguments method to return an array of RuleExpression objects associated with this FunctionCall. These are the RuleExpression objects that were added using the AddArgument method.
Parameters
None.
Returns
An array of RuleExpression objects.
See Also
In this section we discuss the FunctionCall class properties. The properties are described in alphabetical order.
Description
This property specifies the name of the function call used to instantiate the FunctionCall object.
This property is read-only.
Description
This property specifies the type of the function call used to instantiate the FunctionCall object.
This property is read-only.
A MemberReference object represents a member in an analytic calculation engine rule.
Use the following code to create a MemberReference object:
&Member = create MemberReference(DimensionName, MemberName);
This section discusses the MemberReference class method.
Syntax
GenerateRule()
Description
Use the GenerateRule method to return a string that contains the rule for this object.
Generally you wouldn’t use this method on the individual RuleExpression objects, but instead would use the GenerateRule method on the RuleDefn object.
Parameters
None.
Returns
A string.
In this section we discuss MemberReference class properties. The properties are described in alphabetical order.
Description
This property specifies the name of the dimension used to create the MemberReference object.
This property is read-only.
Description
This property specifies the name of the member used to create the MemberReference object.
This property is read-only.
An operation object represents an operation in an analytic calculation engine rule. The operation is generally some type of mathematical function performed between two operands. Specify the operands for the operation using the Operand1 and Operand2 operation class properties.
Use the following code to create an operation object:
&Comparison = create Operation(&Constants.Operation_Type);
Where Operation_Type has a value of one of the following:
Value |
Description |
Operation_Type_Plus |
The operation is addition. |
Operation_Type_Minus |
The operation is subtraction. |
Operation_Type_Mult |
The operation is multiplication. |
Operation_Type_Div |
The operation is division. |
Operation_Type_And |
Use a logical AND with the operation. |
Operation_Type_Or |
Use a logical OR with the operation. |
Operation_Type_Not |
Use a logical NOT with the operation. |
Operation_Type_Neg |
Use a mathmatical negate with the operation. |
Operation_Type_Exp |
Use a mathmatical exponent with the operation. |
The following code creates an operations that is a multiplication between two operands.
&operation = create Operation(&Constants.Operation_Type_Mult); &Constant = create Constant(&Constants.Constant_Type_Literal, "PI"); &operation.Operand1 = &Constant; &Constant = create Constant(&Constants.Constant_Type_Literal, "SLOPE"); &operation.Operand2 = &Constant; &FunCall.AddArgument(&operation);
The following is the operation class method.
Syntax
GenerateRule()
Description
Use the GenerateRule method to return a string that contains the rule for this object.
Generally you wouldn’t use this method on the individual RuleExpression objects, but instead would use the GenerateRule method on the RuleDefn object.
Parameters
None.
Returns
A string.
In this section we discuss the operation class properties. The properties are described in alphabetical order.
Description
Use this property to specify the RuleExpression object that is the first operand to be used in the operation.
This property is read-write.
Description
Use this property to specify the RuleExpression object that is the second operand to be used in the operation.
This property is read-write.
Description
This property returns the type of the operation used to instantiate the operation object.
The values for this property are:
Value |
Description |
Operation_Type_Plus |
The operation is addition. |
Operation_Type_Minus |
The operation is subtraction. |
Operation_Type_Mult |
The operation is multiplication. |
Operation_Type_Div |
The operation is division. |
Operation_Type_And |
Use a logical AND for the operation. |
Operation_Type_OR |
Use a logical OR for the operation. |
Operation_Type_Not |
Use a logical NOT for the operation. |
Operation_Type_Neg |
Use a mathmatical negate for the operation. |
Operation_Type_Exp |
Use a mathmatical exponent for the operation. |
A variable object represents a variable in an analytic calculation engine rule.
Use the following code to create a variable object:
&Variable = create Variable(&Constants.Variable_Type, "Variable_Name");
Where Variable_Type is one of the following:
Value |
Description |
Variable_Type_Auto |
Use a local variable. |
Variable_Type_Expression |
The variable is in an expression. Specify an already instantiated rule expression object for the Variable_Name. |
Variable_Type_Dimension |
The variable is a dimension name. Specify a dimension name for the Variable_Name. |
The following code example creates a variable, then adds it to the rule.
&Variable = create Variable(&Constants.Variable_Type_Auto, "StartVal"); &FunCall.AddArgument(&Variable);
The following is the variable class method.
Syntax
GenerateRule()
Description
Use the GenerateRule method to return a string that contains the rule for this object.
Generally you wouldn’t use this method on the individual RuleExpression objects, but instead would use the GenerateRule method on the RuleDefn object.
Parameters
None.
Returns
A string.
In this section we discuss the variable class properties. The properties are described in alphabetical order.
Description
This property specifies the name of the variable that was used to create the variable object, passed in the constructor.
This property is read-only.
Description
This property specifies the type of the variable, passed in the constructor. The possible values are:
Value |
Description |
Variable_Type_Auto |
A local variable. |
Variable_Type_Expression |
The variable is an expression. Specify an already instantiated rule expression object for the Variable_Name. |
Variable_Type_Dimension |
The variable is a dimension name. Specify a dimension name for the Variable_Name. |
This property is read-only.
The following are some examples of the most general cases of using the Analytic Model Metadata classes.
The following code creates an analytic model definition “from scratch” without retrieving an existing definition from the PeopleSoft Application Designer, adds parts such as dimensions, cubes, and cube collections, then saves the definition.
import PT_ANALYTICMODELDEFN:*; Function CreateGENXModel Local PT_ANALYTICMODELDEFN:AnalyticModelDefn &Model; Local PT_ANALYTICMODELDEFN:UserFunctionDefn &UserFunc; Local PT_ANALYTICMODELDEFN:DimensionDefn &Dim; Local PT_ANALYTICMODELDEFN:CubeDefn &Cube; Local PT_ANALYTICMODELDEFN:CubeCollectionDefn &CubeColl; Local array of string &arr; &ACEMODELID = QE_ACE_META_WK.QE_ACE_MODELID.Value; &Model = create PT_ANALYTICMODELDEFN:AnalyticModelDefn(&ACEMODELID); &Model.Create(); /* Model Properties */ &Model.Description = QE_ACE_META_WK.DESCR; &Model.LongDescription = QE_ACE_META_WK.DESCR200; &Model.MaxDelta = QE_ACE_META_WK.QE_ACE_MAXDELTA_FL; &Model.MaxIterations = QE_ACE_META_WK.QE_ACE_MAXITER_FLD; If (QE_ACE_META_WK.QE_ACE_CIRCWARN_FL.Value = 0) Then &Circ = True; Else &Circ = False; End-If; If (QE_ACE_META_WK.QE_ACE_RESOLVE_FLD.Value = 0) Then &Resolve = True; Else &Resolve = False; End-If; &Model.ResolveCircularDeps = &Resolve; &Model.CircularFormulaWarn = &Circ; /* Add User Functions */ &UserFunction = &Model.AddUserFunction("FILTERPRODUCTS"); &Rule = &UserFunction.GetRule(); &Rule.RuleString = "IF( ((UNIT_COST = 0) .AND. (UNITS_SOLD = 0) .AND. (PROD_SALES =0 )) , RETURN(0), RETURN(1))"; &UserFunction.SetRule(&Rule); /* Add the Dimensions */ &Dim = &Model.AddDimension("MONTH"); &Dim = &Model.AddDimension("PRODUCTS"); &Dim.TotalMemberName = "TOTAL"; &Dim = &Model.AddDimension("PROD_CAT"); &Dim = &Model.AddDimension("REGION"); /* Add the cubes */ &Cube = &Model.AddCube("PROD_SALES"); &Cube.FormatType = &Cube.AnalyticModel_Format_Number; &Cube.IsVirtual = False; &Cube.CalcAggregates = False; &Cube.Rule = "UNIT_COST * UNITS_SOLD"; &Cube.AttachDimension("MONTH"); &Cube.AttachDimension("PRODUCTS"); &Cube.AttachDimension("REGION"); &Cube = &Model.AddCube("SALES"); &Cube.FormatType = &Cube.AnalyticModel_Format_Number; &Cube.IsVirtual = False; &Cube.CalcAggregates = False; &Cube = &Model.AddCube("TGT_COST"); &Cube.FormatType = &Cube.AnalyticModel_Format_Number; &Cube.IsVirtual = False; &Cube.CalcAggregates = False; &Cube.AttachDimension("PRODUCTS"); &Cube = &Model.AddCube("UNITS_SOLD"); &Cube.FormatType = &Cube.AnalyticModel_Format_Number; &Cube.IsVirtual = False; &Cube.CalcAggregates = False; &Cube.AttachDimension("MONTH"); &Cube.AttachDimension("PRODUCTS"); &Cube.AttachDimension("REGION"); &Cube = &Model.AddCube("UNIT_COST"); &Cube.FormatType = &Cube.AnalyticModel_Format_Number; &Cube.IsVirtual = False; &Cube.CalcAggregates = False; &Cube.AttachDimension("MONTH"); &Cube.AttachDimension("PRODUCTS"); &Cube.AttachDimension("REGION"); /* Add Cube Collections */ &CubeColl = &Model.AddCubeCollection("REG_SALES_IN"); &CubeColl.RecordName = "QE_BAM_FACT_TBL"; &CubeColl.AttachCube("PROD_SALES"); &CubeColl.AttachCube("UNITS_SOLD"); &CubeColl.AttachCube("UNIT_COST"); &CubeColl.SetFieldMapping("MONTH", "QE_BAM_MONTH_FLD", False); &CubeColl.SetPersistAggregate("MONTH", &CubeColl.AnalyticModel_AggrType_None); &CubeColl.SetDimSort("MONTH", False, "", False, "", False, ""); &CubeColl.SetFieldMapping("PRODUCTS", "QE_BAM_PRODUCT_FLD", False); &CubeColl.SetPersistAggregate("PRODUCTS", &CubeColl.AnalyticModel_AggrType_None); &CubeColl.SetDimSort("PRODUCTS", False, "", False, "", False, ""); &CubeColl.SetFieldMapping("REGION", "QE_BAM_REGION_FLD", False); &CubeColl.SetPersistAggregate("REGION", &CubeColl.AnalyticModel_AggrType_None); &CubeColl.SetDimSort("REGION", False, "", False, "", False, ""); &CubeColl.SetFieldMapping("PROD_SALES", "QE_BAM_PRDSALES_FL", True); &CubeColl.SetFieldMapping("UNITS_SOLD", "QE_BAM_SALES_FLD", True); &CubeColl.SetFieldMapping("UNIT_COST", "QE_BAM_UNIT_FLD", True); &CubeColl = &Model.AddCubeCollection("REG_SALES_PROD"); &CubeColl.RecordName = "QE_BAM_CCSMOKE"; &CubeColl.AttachCube("PROD_SALES"); &CubeColl.AttachCube("UNITS_SOLD"); &CubeColl.AttachCube("UNIT_COST"); &CubeColl.SetFieldMapping("MONTH", "QE_BAM_MONTH_FLD", False); &CubeColl.SetPersistAggregate("MONTH", &CubeColl.AnalyticModel_AggrType_None); &CubeColl.SetDimSort("MONTH", False, "", False, "", False, ""); &CubeColl.SetFieldMapping("PRODUCTS", "QE_BAM_PRODUCT_FLD", False); &CubeColl.SetPersistAggregate("PRODUCTS", &CubeColl.AnalyticModel_AggrType_None); &CubeColl.SetFilter("PRODUCTS", "FILTERPRODUCTS"); &CubeColl.SetDimSort("PRODUCTS", False, "", False, "", False, ""); &CubeColl.SetFieldMapping("REGION", "QE_BAM_REGION_FLD", False); &CubeColl.SetPersistAggregate("REGION", &CubeColl.AnalyticModel_AggrType_None); &CubeColl.SetDimSort("REGION", False, "", False, "", False, ""); &CubeColl.SetFieldMapping("PROD_SALES", "QE_BAM_PRDSALES_FL", True); &CubeColl.SetFieldMapping("UNITS_SOLD", "QE_BAM_SALES_FLD", True); &CubeColl.SetFieldMapping("UNIT_COST", "QE_BAM_UNIT_FLD", True); &CubeColl = &Model.AddCubeCollection("TGT_COST_PROD"); &CubeColl.RecordName = "QE_BAM_CC_TRGT"; &CubeColl.AttachCube("TGT_COST"); &CubeColl.SetFieldMapping("PRODUCTS", "QE_BAM_PRODUCT_FLD", False); &CubeColl.SetPersistAggregate("PRODUCTS", &CubeColl.AnalyticModel_AggrType_None); &CubeColl.SetDimSort("PRODUCTS", False, "", False, "", False, ""); &CubeColl.SetFieldMapping("TGT_COST", "QE_BAM_TARGET_FLD", True); &Model.Save(); /* &Valid = &Model.Validate(); */ QE_ACE_META_WK.QE_BAM_PCSTATUS = "The Model " | &ACEMODELID | " was created and saved."; End-Function;