Analytic Calculation Engine Metadata Classes

This chapter provides an overview of the Analytic Calculation Engine Metadata classes, and discuses:

Important! The Analytic Calculation Engine Metadata classes are not supported on IBM z/OS and Linux for IBM System z platforms.

Click to jump to parent topicUnderstanding the PeopleSoft Analytic Calculation Engine Metadata Classes

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:

See Also

Analytic Calculation Engine Classes

Analytic Grid Classes

Analytic Type Classes

Click to jump to parent topicUsing the Analytic Calculation Engine Metadata Classes

You can create analytic model definitions using 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 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.

Click to jump to top of pageClick to jump to parent topicInserting and Deleting Objects

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.

Click to jump to top of pageClick to jump to parent topicBuilding a Rule as an Object

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;

Click to jump to parent topicError Handling

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

Try-Catch Sections

Click to jump to parent topicData Types of the Analytic Calculation Engine Metadata Objects

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.

Click to jump to parent topicScope of Analytic Calculation Engine Metadata Objects

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 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.

Click to jump to parent topicHow to Import the Analytic Calculation Engine Metadata Classes

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:

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:

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

Application Classes

Click to jump to parent topicHow to Create an Analytic Calculation Engine Metadata Class Object

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

Click to jump to parent topicAnalytic 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.

Click to jump to top of pageClick to jump to parent topicAnalyticModelDefn

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

AnalyticModelDefn Class

Click to jump to parent topicAnalyticModelDefn Class

Use the AnalyticModelDefn class to view or manipulate an analytic model definition that's already been created in Application Designer, or to create a new definition.

See Also

Enterprise PeopleTools 8.51 PeopleBook: Analytic Calculation Engine

Click to jump to parent topicAnalyticModelDefn Class Methods

The following section discusses the AnalyticModelDefn class methods. The methods are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicAddCube

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.

CubeDefn Class

Click to jump to top of pageClick to jump to parent topicAddCubeCollection

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.

Click to jump to top of pageClick to jump to parent topicAddDimension

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.

DimensionDefn Class

Click to jump to top of pageClick to jump to parent topicAddExplicitDimensionSet

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.

Click to jump to top of pageClick to jump to parent topicAddOrganizer

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.

OrganizerDefn Class

Click to jump to top of pageClick to jump to parent topicAddUserFunction

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.

UserFunctionDefn Class

Click to jump to top of pageClick to jump to parent topicCopyCube

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.

CubeDefn Class

Click to jump to top of pageClick to jump to parent topicCopyCubeCollection

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.

CubeCollectionDefn Class

Click to jump to top of pageClick to jump to parent topicCopyDimension

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.

Click to jump to top of pageClick to jump to parent topicCopyExplicitDimensionSet

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.

Click to jump to top of pageClick to jump to parent topicCopyTo

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.

Click to jump to top of pageClick to jump to parent topicCopyUserFunction

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.

UserFunctionDefn Class

Click to jump to top of pageClick to jump to parent topicCreate

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 Application Designer as an analytic model definition.

If the model already exists, an exception is thrown.

Parameters

None.

Returns

None.

See Also

CopyTo, Delete, Get, Rename.

Click to jump to top of pageClick to jump to parent topicDelete

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.

Click to jump to top of pageClick to jump to parent topicDeleteCube

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.

CubeCollectionDefn Class

Click to jump to top of pageClick to jump to parent topicDeleteCubeCollection

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.

CubeCollectionDefn Class

Click to jump to top of pageClick to jump to parent topicDeleteDimension

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.

DimensionDefn Class

Click to jump to top of pageClick to jump to parent topicDeleteExplicitDimensionSet

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.

Click to jump to top of pageClick to jump to parent topicDeleteOrganizer

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.

OrganizerDefn Class

Click to jump to top of pageClick to jump to parent topicDeleteUserFunction

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.

UserFunctionDefn Class

Click to jump to top of pageClick to jump to parent topicGet

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.

Click to jump to top of pageClick to jump to parent topicGetCube

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.

CubeCollectionDefn Class

Click to jump to top of pageClick to jump to parent topicGetCubeCollection

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.

CubeCollectionDefn Class

Click to jump to top of pageClick to jump to parent topicGetCubeCollectionNames

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.

CubeCollectionDefn Class

Array Class

Click to jump to top of pageClick to jump to parent topicGetCubeNames

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.

CubeCollectionDefn Class

Array Class

Click to jump to top of pageClick to jump to parent topicGetDimension

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.

DimensionDefn Class

Click to jump to top of pageClick to jump to parent topicGetDimensionNames

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.

DimensionDefn Class

Array Class

Click to jump to top of pageClick to jump to parent topicGetExplicitDimensionSet

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.

Click to jump to top of pageClick to jump to parent topicGetExplicitDimensionSetNames

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

ExplicitDimensionSet Class

Click to jump to top of pageClick to jump to parent topicGetOrganizer

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.

OrganizerDefn Class

Click to jump to top of pageClick to jump to parent topicGetOrganizerNames

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.

OrganizerDefn Class

Array Class

Click to jump to top of pageClick to jump to parent topicGetUserFunction

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.

UserFunctionDefn Class

Click to jump to top of pageClick to jump to parent topicGetUserFunctionNames

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.

UserFunctionDefn Class

Array Class

Click to jump to top of pageClick to jump to parent topicRename

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

Create, Get, Save.

Click to jump to top of pageClick to jump to parent topicRenameCube

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.

CubeDefn Class

Click to jump to top of pageClick to jump to parent topicRenameCubeCollection

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.

GetCubeCollectionNames

Click to jump to top of pageClick to jump to parent topicRenameDimension

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.

DimensionDefn Class

Click to jump to top of pageClick to jump to parent topicRenameExplicitDimensionSet

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.

Click to jump to top of pageClick to jump to parent topicRenameOrganizer

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.

OrganizerDefn Class

Click to jump to top of pageClick to jump to parent topicRenameUserFunction

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.

UserFunctionDefn Class

Click to jump to top of pageClick to jump to parent topicSave

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

Create, Validate.

IsValid, Messages.

Click to jump to top of pageClick to jump to parent topicValidate

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.

Click to jump to parent topicAnalyticModelDefn Properties

The following section discusses the AnalyticModelDefn class properties. The properties are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicCircularFormulaWarn

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.

Click to jump to top of pageClick to jump to parent topicDescription

Description

Use this property to specify the description of the analytic model. This property takes a string value.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicIsValid

Description

This property indicates if the analytic model is valid, that is, if it would successfully load.

This property is read-only.

See Also

Validate, Save.

Validating Analytic Models

Click to jump to top of pageClick to jump to parent topicLongDescription

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.

Click to jump to top of pageClick to jump to parent topicMaxDelta

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

Click to jump to top of pageClick to jump to parent topicMaxIterations

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

Click to jump to top of pageClick to jump to parent topicMessages

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

Validate, Save.

Click to jump to top of pageClick to jump to parent topicName

Description

This property indicates the name of the analytic model.

This property is read-only.

See Also

Rename

Click to jump to top of pageClick to jump to parent topicResolveCircularDeps

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.

Click to jump to parent topicDimensionDefn Class

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:

Click to jump to parent topicDimensionDefn Class Properties

The following section discusses the DimensionDefn class properties. The properties are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicAggregateSequence

Description

This property indicates the sequence number of this dimension used during aggregation of the analytic model

This property is read-only..

Click to jump to top of pageClick to jump to parent topicAggregationUserFunction

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.

Click to jump to top of pageClick to jump to parent topicComments

Description

Use this property to specify additional notes about the dimension.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicName

Description

This property indicates the name of the dimension.

This property is read-only.

See Also

GetDimensionNames, RenameDimension.

Click to jump to top of pageClick to jump to parent topicTotalMemberName

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.

Click to jump to parent topicExplicitDimensionSet Class

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:

You can also use the GetExplicitDimensionSetNames to return an array containing the names of all the explicit dimension sets associated with the analytic model.

Click to jump to parent topicExplicitDimensionSet Methods

The following section discusses the ExplicitDimensionSet class methods. The methods are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicAttachDimension

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

DetachDimension

Click to jump to top of pageClick to jump to parent topicDetachDimension

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

AttachDimension

Click to jump to top of pageClick to jump to parent topicGetDimensionNames

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.

Click to jump to parent topicExplicitDimensionSet Properties

The following section discusses the ExplicitDimensionSet class properties. The properties are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicName

Description

The Name property returns the name of the explicit dimension set as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicSequenceNumber

Description

This property returns the sequence number of the explicit dimension set.

This property is read-only.

Click to jump to parent topicCubeDefn Class

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:

Click to jump to parent topicCubeDefn Class Methods

The following section discusses the CubeDefn class methods. The methods are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicAttachDimension

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.

AddDimension

DimensionDefn Class

Click to jump to top of pageClick to jump to parent topicDetachDimension

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.

AddDimension

DimensionDefn Class

Click to jump to top of pageClick to jump to parent topicGetCauses

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

GetEffects, GetCircularDeps.

Understanding Causes and Inputs

Click to jump to top of pageClick to jump to parent topicGetCircularDeps

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

GetCauses, GetEffects.

Enterprise PeopleTools 8.51 PeopleBook: Analytic Calculation Engine

Click to jump to top of pageClick to jump to parent topicGetDimensionAggregate

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

SetDimensionAggregate

GetUserFunctionNames

UserFunctionDefn Class

Click to jump to top of pageClick to jump to parent topicGetEffects

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

GetCauses, GetCircularDeps.

Enterprise PeopleTools 8.51 PeopleBook: Analytic Calculation Engine

Click to jump to top of pageClick to jump to parent topicGetDimensionNames

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.

Array Class

Click to jump to top of pageClick to jump to parent topicGetRule

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

RuleDefn Class

SetRule

Click to jump to top of pageClick to jump to parent topicSetDimensionAggregate

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

GetDimensionAggregate

Click to jump to top of pageClick to jump to parent topicSetRule

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

GetRule

RuleDefn Class

Click to jump to top of pageClick to jump to parent topicUsesDimension

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.

Click to jump to parent topicCubeDefn Class Properties

The following section discusses the CubeDefn class properties. The properties are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicCalcAggregates

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.

Click to jump to top of pageClick to jump to parent topicComments

Description

Use this property to specify additional notes about the cube.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicDimensionCount

Description

This property indicates the number of dimensions associated with this cube.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicFormatType

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.

Click to jump to top of pageClick to jump to parent topicIsVirtual

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.

Click to jump to top of pageClick to jump to parent topicName

Description

This property specifies the name of the cube.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicValueDimensionName

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

FormatType

Enterprise PeopleTools 8.51 PeopleBook: Analytic Calculation Engine

Click to jump to parent topicCubeCollectionDefn Class

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:

Click to jump to parent topicCubeCollectionDefn Class Methods

The following section discusses the CubeCollectionDefn class methods. The methods are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicAttachCube

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

DetachCube, GetCubeNames.

CubeDefn Class

Click to jump to top of pageClick to jump to parent topicDetachCube

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

CubeDefn Class, GetCubeNames.

CubeDefn Class

Click to jump to top of pageClick to jump to parent topicGetAggregateMapping

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.

Click to jump to top of pageClick to jump to parent topicGetCubeNames

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.

CubeDefn Class

Array Class

Click to jump to top of pageClick to jump to parent topicGetDimensionNames

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.

DimensionDefn Class

Click to jump to top of pageClick to jump to parent topicGetDimSort

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:

Parameters

DimensionName

Specify the name of the dimension for which you want the sorting keys.

Returns

An array of any.

See Also

SetDimSort

GetDimSort, SetDimSort.

Click to jump to top of pageClick to jump to parent topicGetFieldMapping

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.

Click to jump to top of pageClick to jump to parent topicGetFilter

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

SetAggregateMapping

Filter User Functions

Click to jump to top of pageClick to jump to parent topicGetPersistAggregate

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.

Click to jump to top of pageClick to jump to parent topicSetAggregateMapping

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.

Click to jump to top of pageClick to jump to parent topicSetDimSort

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

SetPersistAggregate

GetDimSort

Click to jump to top of pageClick to jump to parent topicSetFieldMapping

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.

Click to jump to top of pageClick to jump to parent topicSetFilter

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

GetFilter

Filter User Functions

Click to jump to top of pageClick to jump to parent topicSetPersistAggregate

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.

Click to jump to top of pageClick to jump to parent topicUsesCube

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.

CubeDefn Class

Click to jump to top of pageClick to jump to parent topicUsesDimension

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

CubeDefn Class

DimensionDefn Class

Click to jump to parent topicCubeCollectionDefn Class Properties

The following section discusses the CubeCollectionDefn class properties. The properties are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicAggregateRecName

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.

Click to jump to top of pageClick to jump to parent topicComments

Description

Use this property to specify additional notes about the cube collection.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicCubeCount

Description

This property returns the number of cubes in the cube collection.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicDimensionCount

Description

This property returns the number of dimensions associated with this cube collection.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicName

Description

This property returns the name of the cube collection as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicRecordName

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.

Click to jump to parent topicUserFunctionDefn Class

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:

Click to jump to parent topicUserFunctionDefn Class Methods

In this section we discuss the UserFunctionDefn class methods. They are described in alphabetical order.

Click to jump to top of pageClick to jump to parent topicGetRule

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

RuleDefn Class

Click to jump to top of pageClick to jump to parent topicSetRule

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.

Click to jump to parent topicUserFunctionDefn Class Properties

The following section discusses the UserFunctionDefn class properties. The properties are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicComments

Description

Use this property to specify additional notes about the user function.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicName

Description

This property specifies the name of the user function.

This property is read-only.

Click to jump to parent topicOrganizerDefn Class

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:

Click to jump to parent topicOrganizerDefn Class Methods

The following section discusses the OrganizerDefn class methods. The methods are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicAttachPart

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.

Click to jump to top of pageClick to jump to parent topicDetachPart

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.

Click to jump to top of pageClick to jump to parent topicGetPartNames

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.

Click to jump to top of pageClick to jump to parent topicUsesPart

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.

Click to jump to parent topicOrganizerDefn Class Properties

The following section discusses the OrganizerDefn class properties. The properties are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicComments

Description

Use this property to specify additional notes about the organizer.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicName

Description

This property specifies the name of the organizer.

This property is read-only.

Click to jump to parent topicRuleDefn Class

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.

Click to jump to parent topicRuleDefn Class Methods

In this section, we discuss the RuleDefn class methods. The methods are described in alphabetical order.

Click to jump to top of pageClick to jump to parent topicAddRuleExpression

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

GenerateRule

RuleExpressions Classes

Click to jump to top of pageClick to jump to parent topicGenerateRule

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

AddRuleExpression

RuleExpressions Classes

Click to jump to parent topicRuleDefn Class Property

The following describes the RuleDefn class property.

Click to jump to top of pageClick to jump to parent topicRuleString

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.

Click to jump to parent topicRuleExpressions Classes

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:

Note. The RuleExpression object is the object that the other objects are derived from. You should not create or use this object directly.

Click to jump to top of pageClick to jump to parent topicUsing the Constants Class

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.

Click to jump to parent topicAssignment Class

An assignment object represents an assignment statement in an analytic calculation rule.

Use the following to create an assignment object:

&Assignment = create Assignment();

Click to jump to parent topicAssignment Class Method

The following is the method for the assignment class.

Click to jump to top of pageClick to jump to parent topicGenerateRule

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

AddRuleExpression

RuleExpressions Classes

Click to jump to parent topicAssignment Class Properties

In this section we discuss the assignment class properties. The properties are described in alphabetical order.

Click to jump to top of pageClick to jump to parent topicExpression

Description

Use the Expression property to specify the right-hand side of the assignment statement.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicVariable

Description

Use the Variable property to specify the left-hand side of the assignment statement.

This property is read-write.

Click to jump to parent topicComparison Class

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);

Click to jump to parent topicComparison Class Method

The following is the comparison class method.

Click to jump to top of pageClick to jump to parent topicGenerateRule

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

AddRuleExpression

RuleExpressions Classes

Click to jump to parent topicComparison Class Properties

In this section we discuss the comparison class properties. The properties are described in alphabetical order.

Click to jump to top of pageClick to jump to parent topicOperand1

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.

Click to jump to top of pageClick to jump to parent topicOperand2

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.

Click to jump to top of pageClick to jump to parent topicType

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.

Click to jump to parent topicConstant 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:

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");

Click to jump to parent topicConstant Class Method

The following is the constant class method.

Click to jump to top of pageClick to jump to parent topicGenerateRule

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.

Click to jump to parent topicConstant Class Properties

In this section we discuss the constant class properties. The properties are described in alphabetical order.

Click to jump to top of pageClick to jump to parent topicType

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

Constant Class

Click to jump to top of pageClick to jump to parent topicValue

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

Constant Class

Click to jump to parent topicConstants Class

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.

Click to jump to parent topicCube Class

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");

Click to jump to parent topicCube Class Methods

In the following section, we discuss the cube class methods. The methods are described in alphabetical order.

Click to jump to top of pageClick to jump to parent topicAddIndex

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

MemberReference Class

Click to jump to top of pageClick to jump to parent topicGenerateRule

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.

Click to jump to top of pageClick to jump to parent topicGetIndexes

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

MemberReference Class

AddIndex

Click to jump to parent topicCube Class Property

The following is the cube class property.

Click to jump to top of pageClick to jump to parent topicName

Description

This property indicates the name of the cube that was used to instantiate the cube object.

This property is read-only.

Click to jump to parent topicExpressionBlock Class

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();

Click to jump to parent topicExpressionBlock Methods

In the following section we discuss the ExpressionBlock class methods. The methods are described in alphabetical order.

Click to jump to top of pageClick to jump to parent topicAddRuleExpression

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.

Click to jump to top of pageClick to jump to parent topicGetRuleExpressions

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.

Click to jump to parent topicFunctionCall Class

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:

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

Click to jump to parent topicFunctionCall Class Methods

In this section we discuss the FunctionCall class methods. The methods are described in alphabetical order.

Click to jump to top of pageClick to jump to parent topicAddArgument

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.

Click to jump to top of pageClick to jump to parent topicGenerateRule

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.

Click to jump to top of pageClick to jump to parent topicGetArguments

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

AddArgument

Click to jump to parent topicFunctionCall Class Properties

In this section we discuss the FunctionCall class properties. The properties are described in alphabetical order.

Click to jump to top of pageClick to jump to parent topicName

Description

This property specifies the name of the function call used to instantiate the FunctionCall object.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicType

Description

This property specifies the type of the function call used to instantiate the FunctionCall object.

This property is read-only.

Click to jump to parent topicMemberReference Class

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);

Click to jump to parent topicMemberReference Class Method

This section discusses the MemberReference class method.

Click to jump to top of pageClick to jump to parent topicGenerateRule

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.

Click to jump to parent topicMemberReference Class Properties

In this section we discuss MemberReference class properties. The properties are described in alphabetical order.

Click to jump to top of pageClick to jump to parent topicDimension

Description

This property specifies the name of the dimension used to create the MemberReference object.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicMember

Description

This property specifies the name of the member used to create the MemberReference object.

This property is read-only.

Click to jump to parent topicOperation Class

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);

Click to jump to parent topicOperation Class Method

The following is the operation class method.

Click to jump to top of pageClick to jump to parent topicGenerateRule

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.

Click to jump to parent topicOperation Class Properties

In this section we discuss the operation class properties. The properties are described in alphabetical order.

Click to jump to top of pageClick to jump to parent topicOperand1

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.

Click to jump to top of pageClick to jump to parent topicOperand2

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.

Click to jump to top of pageClick to jump to parent topicType

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.

Click to jump to parent topicVariable Class

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);

Click to jump to parent topicVariable Class Method

The following is the variable class method.

Click to jump to top of pageClick to jump to parent topicGenerateRule

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.

Click to jump to parent topicVariable Class Properties

In this section we discuss the variable class properties. The properties are described in alphabetical order.

Click to jump to top of pageClick to jump to parent topicName

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.

Click to jump to top of pageClick to jump to parent topicType

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.

Click to jump to parent topicAnalytic Model Metadata Classes Examples

The following are some examples of the most general cases of using the Analytic Model Metadata classes.

Click to jump to top of pageClick to jump to parent topicCreating an Analytic Model Code Example

The following code creates an analytic model definition “from scratch” without retrieving an existing definition from the 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;