Analytic Calculation Engine Classes

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

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

Click to jump to parent topicUnderstanding the Analytic Calculation Engine 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 Metadata Classes

Analytic Grid Classes

Analytic Type Classes

PeopleTools 8.52: Analytic Calculation Engine

Click to jump to top of pageClick to jump to parent topicUsing the Analytic Calculation Engine Classes with Application Engine

All Application Engine programs run on the application engine server. This means your program runs on the application engine server, not the analytic server.

PeopleSoft recommends that you put each of the following methods into its own step when you're creating an analytic calculation using a Application Engine program:

Also, with the Recalculate method, you should use the Commit after step option.

Click to jump to parent topicRunning Synchronously

Some of the methods and functions associated with these classes have the option of being run asynchronously. When you run these asynchronously, and not from a Application Engine program, these methods and functions have additional functionality, that is, if the RenServer is configured, a window displays the PeopleSoft Analytic Calculation Engine execution status.

Click to jump to parent topicUsing Trees

PeopleSoft Analytic Calculation Engine uses trees to establish hierarchies of a dimension's parent-child relationships. PeopleSoft Analytic Calculation Engine uses these hierarchies to:

It is important to understand that PeopleSoft trees and hierarchies differ in the following manner: You create one tree for each dimension that requires a hierarchy. The analytic model uses that tree to create one hierarchy for one dimension.

Use the AttachTree method to attach a tree to a dimension, and use the DetachTree method to detach the tree from the dimension.

You should be aware of the following restrictions:

You can only attach a tree to an analytic model before the analytic instance

No aggregate data displayed to user after detach tree.

See Also

Creating Hierarchies

Click to jump to parent topicError Handling

All the Analytic Calculation Engine 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.

Using the Messages Property

Use the Messages property to determine whether any errors occurred. The Messages property returns a multi-dimensional array. You can use the Len property of the array class to determine the length of the array. If the array has a length of 0, there are no errors.

Click to jump to parent topicData Types for Analytic Calculation Engine Classes

Every PeopleSoft Analytic Calculation Engine object is declared as its own data type, that is, AnalyticModel objects are declared as type AnalyticModel, CubeCollection objects are declared as type CubeCollection, and so on.

The following are the data types for the PeopleSoft Analytic Calculation Engine classes:

Click to jump to parent topicScope of Analytic Calculation Engine Classes

The Analytic Calculation Engine 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 objects can be of scope Local, Component, or Global.

Click to jump to parent topicAnalytic Calculation Engine Classes Built-in Functions

CreateAnalyticInstance

GetAnalyticInstance

Click to jump to parent topicAnalyticInstance Class Methods

In this section, we discuss the AnalyticInstance methods. The methods are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicCheckAsyncStatus

Syntax

CheckAsyncStatus(OperationID)

Description

Use the CheckAsyncStatus method to determine the current state of the asynchronous methods, as well as the Load method when executed asynchronously.

Parameters

OperationID

Specify the operation ID of the asynchronous operation. This operation ID is returned when one of the asynchronous operations is executed.

Returns

This method returns one of the following values:

Value

Description

Less than 0

The operation completed with errors.

0

The operation has not completed yet.

Greater than 0

The operation completed successfully.

See Also

CheckStatus, Load, Unload.

Click to jump to top of pageClick to jump to parent topicCheckStatus

Syntax

CheckStatus()

Description

Use the CheckStatus method to determine the current state of the analytic calculation engine.

Parameters

None.

Returns

This method returns one of the following values:

Value

Description

%AnalyticInstance_NotLoaded

The analytic instance has not been loaded into the application server.

%AnalyticInstance_Loading

The analytic instance is being loaded.

%AnalyticInstance_Idle

The analytic instance is idle, that is, not currently running.

%AnalyticInstance_Busy

The analytic instance is currently running.

%AnalyticInstance_ Inaccessible

The analytic instance is currently inaccessible.

%AnalyticInstance_ Terminating

The analytic instance is currently ending.

See Also

Load, Unload.

Click to jump to top of pageClick to jump to parent topicCopy

Syntax

Copy(NewID, ForceDelete&Record)

Description

Use the Copy method to copy all the data and metadata to a new analytic instance from the current analytic instance.

If the specified NewID exists, or any data for NewID exists, the data is not copied unless ForceDelete has been specified as true.

If a tree is attached to the existing analytic instance, all tree data is also copied to the new analytic instance.

In addition, the analytic instance and the tree information are not copied unless the record specified with the &Record parameter is populated with the existing analytic instance ID.

Parameters

NewID

Specify the new analytic instance ID as a string.

ForceDelete

If the specified NewID exists, and ForceDelete is specified as false, the copy is cancelled.

If the specified NewID exists, and ForceDelete is specified as true, the analytic instance specified by NewID is deleted, and a new analytic instance is created from the current ID.

&Record

Specify an already instantiated record object to pass in values to the Copy application package method that's defined with the specified analytic type definition.

Returns

None.

Example

&ai.Copy("MYTESTCOPY", True, &MyRecord);

See Also

Delete, Load, Unload.

Designing Analytic Type Definitions

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

Syntax

Delete(ForceUnload, &RecordRef)

Description

Use the Delete method to remove all the metadata related to the given analytic instance.

Every analytic type definition is defined with an application package that contains three methods: Create, Delete, and Copy. The values in &RecordRef are passed to the Delete method.

This method does not delete the analytic instance if the analytic instance is currently loaded. Specify ForceUnload as true to unload the analytic instance before deleting it.

Parameters

ForceUnload

Specify whether to force the deletion of the analytic instance. This parameter takes a Boolean value. If the analytic instance is currently loaded, specifying true for this parameter forces the analytic instance to be unloaded before it is deleted.

&RecordRef

Specify a record to pass in values to the application package Delete class that's associated with the analytic type definition.

Returns

None.

Example

&ai.Delete(TRUE, &Record);

See Also

Unload

Designing Analytic Type Definitions

Click to jump to top of pageClick to jump to parent topicGetAnalyticModel

Syntax

GetAnalyticModel(Model.ModelName)

Description

Use the GetAnalyticModel method to return a reference to an AnalyticModel object.

Parameters

ModelName

Specify the name of the analytic model for which you want to return a reference. The model definition must already exist in Application Designer.

Returns

A reference to an AnalyticModel object or Null.

See Also

AnalyticModel Class Methods

Click to jump to top of pageClick to jump to parent topicLoad

Syntax

Load(Sync, IdleTimeOut, Message.messagename)

Description

Use the Load method to load the AnalyticInstance object executing the method into the analytic server.

If this analytic instance is already loaded, this method fails.

When the analytic instance is loaded, if there are fields in the analytic type definition that haven't been selected but are mapped to a cube or dimension, an error message is logged to the analytic server log and the analytic instance load fails.

If there is a record in the analytic type definition that has none of its fields mapped to a cube or dimension, a warning message is logged to the analytic server log.

Parameters

Sync

Specify whether the analytic instance should be run synchronously or asynchronously. This parameter takes a Boolean value: true if it should be run synchronously, false otherwise.

See Running Synchronously.

IdleTimeOut

Specify, in minutes, the idle time out value. A value of 0 is an infinite time out. A value of -1 indicates that it should use the value specified in the default configuration for the analytic server.

Note. When loading an analytic grid, you should always specify a value of -1.

See Loading and Unloading Analytic Instances.

Message. MessageName

Specify an application message that should be sent if the analytic server crashes while the analytic instance is loaded.

Note. The message is sent when the analytic server process restarts itself after crashing.

Returns

A string. For asynchronous loads, this string is passed to the CheckAsyncStatus method.

This method returns one of the following values:

Value

Description

%AnalyticInstance_NotLoaded

The analytic instance has not been loaded into the analytic server.

%AnalyticInstance_Loading

The analytic instance is being loaded.

%AnalyticInstance_Idle

The analytic instance is idle, that is, not currently running.

%AnalyticInstance_Busy

The analytic instance is currently running.

%AnalyticInstance_ Inaccessible

The analytic instance is currently inaccessible.

%AnalyticInstance_ Terminating

The analytic instance is currently terminating.

See Also

CheckAsyncStatus, Unload.

Click to jump to top of pageClick to jump to parent topicRunAsync

Syntax

RunAsync()

Description

Use the RunAsync method to specify if the analytic instance executing the method should be run in an asynchronous manner.

This method is used only to define the transaction in the analytic type definition in optimization. PeopleSoft Analytic Calculation Engine programs uses the Load method for defining synchronous or asynchronous operation.

Parameters

None.

Returns

None.

See Also

Configuring Analytic Type Transactions

Click to jump to top of pageClick to jump to parent topicRunSync

Syntax

RunSync()

Description

Use the RunSync method to specify if the analytic instance executing the method should be run in a synchronous manner.

This method is used only to define the transaction in the analytic type definition in optimization. PeopleSoft Analytic Calculation Engine programs uses the Load method for defining synchronous or asynchronous operation.

Parameters

None.

Returns

None.

See Also

Configuring Analytic Type Transactions

Click to jump to top of pageClick to jump to parent topicTerminate

Syntax

Terminate()

Description

Use the Terminate method to force the termination of an analytic instance loaded in an analytic server.

This method should only be used from PeopleCode running in a Application Engine program to cause an analytic instance loaded in an analytic server to be terminated.

Attempting to terminate an analytic instance that is not loaded or is loaded in a Application Engine process results in a PeopleCode exception.

Although the Terminate method returns instantly, it may take up to a minute before the analytic instance is actually terminated.

Parameters

None.

Returns

None.

See Also

Load, Unload.

Click to jump to top of pageClick to jump to parent topicUnload

Syntax

Unload()

Description

Use the Unload method to unload the analytic instance executing the method from the analytic server. After unloading the analytic instance, the analytic server process is restarted.

Parameters

None.

Returns

None.

Example

&ai.UnLoad();

See Also

Load

Click to jump to parent topicAnalyticInstance Class Properties

In this section, we discuss the AnalyticInstance properties. The properties are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicAnalyticType

Description

This property returns the name of the analytic type definition for this AnalyticInstance object as a string.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicID

Description

This property returns the analytic instance ID of this AnalyticInstance object as an integer.

This property is read-only.

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

Description

This property returns a multi-dimensional array of any, containing the messages that occurred.

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.

After you access this property, only new messages are returned, that is, messages are only returned once.

This property is read-only.

See Also

RunSync

Click to jump to parent topicAnalyticModel Class Methods

In this section, we discuss the AnalyticModel methods. The methods are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicAddMember

Syntax

AddMember(DimName, MemberName)

Description

Use the AddMember method to add the specified dimension member to the specified dimension.

Parameters

DimName

Specify the dimension to which you want to add the member.

MemberName

Specify the name of the member that you want to add to the specified dimension.

Returns

None.

See Also

GetMembers, RenameMember.

Click to jump to top of pageClick to jump to parent topicAttachTree

Syntax

AttachTree(DimName, TreeName, SetID, UserKeyValue, EffDt, NodeName, OverrideRecord, DetailStartLvl, TreeDiscardLvl)

Description

Use the AttachTree method to attach a tree to a dimension. Only one tree can be attached to a dimension at a time. You can only attach a tree before the analytic instance is loaded.

Parameters

DimName

Specify the name of the dimension that you want to attach a tree to.

TreeName

Specify the name of the tree that you want to attach to the dimension.

SetId

Specify the table indirection key for the tree. This parameter takes a string value. If the tree structure the tree is based on has its IndirectionMethod specified as "S", you must specify a SetID.

If the tree structure doesn’t have its IndirectionMethod specified as "S", you must enter a Null string (that is, two quotation marks with no blank space between them ("")) for this parameter.

UserKeyValue

Specify the User Key Value for the tree. This parameter takes a string value. If the tree structure the tree is based on has its IndirectionMethod specified as "U" or "B", you must specify a User Key Value.

If the tree structure doesn’t have its IndirectionMethod specified as "U" or "B", you must enter a Null string (that is, two quotation marks with no blank space between them ("")) for this parameter

EffDt

Specify an effective date for this tree. This parameter takes a string value.

NodeName

Specify the tree node used as the dimension hierarchy root. This can be different from the tree root, that is, you can pick a subtree.

OverrideRecord

Specify the name of a record to be used for overriding the aggregate.

See Working with Overrides.

DetailStartLvl

Specify the tree level number (such as 1 for the node hierarchy root specified by the NodeName parameter) at which detail nodes start.

If you specify a value other than 0, any nodes at this level or greater than this level are considered details node, and any nodes with levels less than the start level are considered aggregate nodes

If you specify 0, detail nodes are nodes that don't have parents (a node can be a parent either by having children or by having child ranges).

TreeDiscardLvl

Specify the tree level number (such as 1 for the node hierarchy root specified by the NodeName parameter) at which to stop loading the tree. Nodes at this level or at levels greater are discarded. This parameter is only used if it has a value other than 0, and if it has a value greater than DetailStartLvl.

Returns

None.

See Also

DetachTree, GetTree.

Tree Classes

Understanding the Relationship of PeopleSoft Trees to Analytic Models

Click to jump to top of pageClick to jump to parent topicCalculateCube

Syntax

CalculateCube(CubeName[, Sync])

Description

Use the CalculateCube method to calculate the named cube in synchronous mode.

Parameters

CubeName

Specify the name of the cube that you want to calculate.

Sync

This parameter is optional and is not used. It is only being included for previous releases. This parameter takes a Boolean value. The value of this parameter is ignored. The cube is always calculated in synchronous mode.

Returns

None.

See Also

Running Synchronously, Recalculate.

Click to jump to top of pageClick to jump to parent topicDetachTree

Syntax

DetachTree(DimName)

Description

Use the DetachTree method to detach a tree from the specified dimension.

You can only attach a tree when the analytic instance is not loaded. This method fails if you try to detach a tree while the analytic instance is loaded.

Parameters

DimName

Specify the name of the dimension from which you want to detach a tree.

Returns

None.

See Also

AttachTree, GetTree.

Tree Classes

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

Syntax

GetCubeCollection(CubeCollName)

Description

Use the GetCubeCollection method to return a reference to a CubeCollection object.

Parameters

CubeCollName

Specify the name of the cube collection to which you want a reference.

Returns

A CubeCollection object if successful.

See Also

CubeCollection Class

Click to jump to top of pageClick to jump to parent topicGetCellProperties

Syntax

GetCellProperties(CubeName, &Node)

Description

Use the GetCellProperties method to get information about a cell.

Parameters

CubeName

Specify the name of the cube that contains the cell you want information about.

&Node

Specify an already instantiated array of array of string (a two-dimensional array of string) containing name-value pairs of the node name and the node detail.

Returns

An array of string.

The four strings returned in the array are:

  1. Cell type. Values are “Aggregate” or “Detail”

  2. User function.

  3. Dimension for aggregation, the dimension name.

  4. Aggregation reason. Values are: “Dimension Level Override”, “Member Level Override”, “Cube Dimension Level Override”, “None.”

See Also

Array Class.

Click to jump to top of pageClick to jump to parent topicGetMembers

Syntax

GetMembers(DimName, DimFilter)

Description

Use the GetMembers method to return the names of the members in the specified dimension. You can specify a user function to be used as a filter for the dimension using DimFilter.

When filtering hierarchy nodes, if the parent member is filtered, all the child nodes are also filtered.

In order to filter the parent member if all of its children are filtered, the user function should be written such that for the parent node, apply the condition on all of its children, using the FORCHILDREN built-in function. If none of the children satisfy the condition, return zero from the user function, which filters the parent node.

Parameters

DimName

Specify the name of the dimension from which you want to get the members.

DimFilter

Specify a user function that you want to use to filter the dimension.

Returns

A two-dimensional array of any.

The first dimension contains the member names. The second dimension contains the parent of the member. The members are sorted in the hierarchy order.

If the dimension does not have a hierarchy, all members are returned as level one.

For example, if the dimension has the following members:

ALLREGIONS NORTH AMERICA USA CANADA MEXICO EUROPE FRANCE GERMANY ENGLAND ASIA JAPAN CHINA

The GetMembers method returns the following:

Member Name

Level

ALLREGIONS

Null

NORTHAMERICA

ALLREGIONS

USA

NORTHAMERICA

CANADA

NORTHAMERICA

MEXICO

NORTHAMERICA

EUROPE

ALLREGIONS

FRANCE

EUROPE

ENGLAND

EUROPE

GERMANY

EUROPE

ASIA

ALLREGIONS

JAPAN

ASIA

CHINA

ASIA

If the total member is present in the metadata, it is returned as level zero.

See Also

AddMember, RenameMember.

Click to jump to top of pageClick to jump to parent topicGetTree

Syntax

GetTree(DimName)

Description

Use the GetTree method to return an array of string that contains information about the tree that is attached to the specified dimension.

Parameters

DimName

Specify the name of the dimension to which a tree is attached.

Returns

An array of string.

The array items have the following format:

  1. TreeName

  2. SetID

  3. UserKeyValue

  4. EffDt

  5. BranchName

  6. Override record name

  7. DetailStartLvl

  8. TreeDiscardLvl

See Also

AttachTree, DetachTree.

Tree Classes

Click to jump to top of pageClick to jump to parent topicRecalculate

Syntax

Recalculate(Sync)

Description

Use the Recalculate method to recalculates the loaded analytic model. If Sync is true, the transaction is synchronous, else it is performed asynchronously.

The Recalculate method always writes any changes to readable, readable and writable, as well as writable records to the database as specified by the analytic type definition.

If you are running in asynchronous mode, this method returns an optional string that contains the operation ID to be used with the CheckAsyncStatus property.

Parameters

Sync

Specify whether the recalculation should be run synchronously or asynchronously. This parameter takes a Boolean value: true if it should be run synchronously, false otherwise.

Returns

A string.

See Also

CalculateCube, CheckAsyncStatus.

AnalyticModelDefn

Click to jump to top of pageClick to jump to parent topicRenameMember

Syntax

RenameMember(DimName, OrigMemberName, NewMemberName)

Description

Use the RenameMember method to rename a member in the specified dimension.

Parameters

DimName

Specify the dimension that contains the member you want to rename.

OrigMemberName

Specify the name of the member that you want to rename.

NewMemberName

Specify the new name for the member specified by OrigMemberName.

Returns

None.

See Also

AddMember, GetMembers.

Click to jump to parent topicAnalyticModel Class Property

In this section, we discuss the AnalyticModel class property.

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

Description

This property returns a multi-dimensional array of any containing the messages that occurred during execution of the Recalculate method.

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.

After you access this property, only new messages are returned, that is, messages are only returned once.

This property is read only.

See Also

Recalculate

Click to jump to parent topicCubeCollection Class

Instantiate a CubeCollection object using the AnalyticModel class GetCubeCollection method.

In cube collections, the total member behaves just as the root of the hierarchy. If it's present, it's displayed first in the list.

Filtering of members in a dimension in the cube collection is similar to filtering members using the AnalyticModel class GetMembers method. If you filter the parent node, the children of that node are filtered as well.

See AnalyticModel class: GetCubeCollection method.

Click to jump to parent topicCubeCollection Class Methods

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

Click to jump to top of pageClick to jump to parent topicCollapseNode

Syntax

CollapseNode(DimName, &Node)

Description

Use the CollapseNode method to collapse a node in the dimension specified by DimName.

Parameters

DimName

Specify the name of the dimension that contains the node you want to collapse.

&Node

Specify an already instantiated array of array of string (a two-dimensional array of string) containing name-value pairs of the node name and the node detail. For example:

PRODUCTS Fax Modem REGION East

Returns

None.

See Also

ExpandNode

Click to jump to top of pageClick to jump to parent topicDrillIntoNode

Syntax

DrillIntoNode(DimName, &Node)

Description

Use the DrillIntoNode method to display more data for the specified node and dimension. This is very similar to expanding, except that when you expand a node, the top level (node) is still present. When you drill into a node, the top level or levels are no longer displayed.

Parameters

DimName

Specify the name of the dimension that contains the node that you want to drill into.

&Node

Specify an already instantiated array of array of string (a two-dimensional array of string) containing name-value pairs of the node name and the node detail. For example:

PRODUCTS Fax Modem REGION East

Returns

None.

See Also

DrillOutOfNode

Click to jump to top of pageClick to jump to parent topicDrillOutOfNode

Syntax

DrillOutOfNode(DimName, &Node)

Description

Use the DrillOutOfNode method to collapse the data that you just expanded.

Parameters

DimName

Specify the name of the dimension that contains the node you want to drill out of.

&Node

Specify an already instantiated array of array of string (a two-dimensional array of string) containing name-value pairs of the node name and the node detail. For example:

PRODUCTS Fax Modem REGION East

Returns

None.

See Also

DrillIntoNode

Click to jump to top of pageClick to jump to parent topicExpandNode

Syntax

ExpandNode(DimName, &Nodes, ExpandAll)

Description

Use the ExpandNode method to expand the nodes in the specified dimension.

Parameters

DimName

Specify the name of the dimension contains the node that you want to expand.

&Nodes

Specify an already instantiated array of array of string (a two-dimensional array of string) containing name-value pairs of the node name and the node detail.

ExpandAll

Specify whether to expand the sub-nodes or not. This parameter takes a Boolean value; true to expand the nodes, false to not expand the nodes.

Returns

None.

Example

In the following example, both the Accounts and Dept dimensions have hierarchies.

Account Dept All Acoounts All Depts | ---- 100 | - ---- A | | | ---- 200 |------ B -| ---D | | | | --- E | ---- 300

When the data is displayed, it will be as follows:

All Accounts All Depts 100 All Depts 200 All Depts 300 All Depts

When you want to expand All Depts under Account 100 , use the following PeopleSoft Analytic Calculation Engine code:

BAMCoordinate coord; coord.SetValue( "Account", "100"); coord.SetValue("Dept" , "All Depts") ExpandNode("Dept", coord, false)

The result of this will have the following:

All Accounts All Depts 100 All Depts A B 200 All Depts 300 All Depts

See Also

CollapseNode

Click to jump to top of pageClick to jump to parent topicGetData

Syntax

GetData(&DataRowset, StartRow, EndRow[, NetChanges])

Description

Use the GetData method to populate a rowset with data from the cube collection.

DataRowset is the rowset into which is put the data. If you specify an already instantiated rowset, the given rowset is populated with the data. If you specify a rowset that has not been instantiated, a new rowset is created, with the record field definition of the desired cube collection.

Parameters

&DataRowset

Specify the rowset into which to put the data. If you specify an already instantiated rowset, the given rowset is populated with the data. If you specify a rowset that has not been instantiated, a new rowset is created, with the record field definition of the desired cube collection.

StartRow

Specify the first row of data to be retrieved, as an integer.

EndRow

Specify the last row of data to be retrieved, as an integer. If you specify a zero for this parameter, all rows are retrieved.

NetChanges

Specify whether all values within the range are returned, or whether just values changed since the last time the Recalculate method was used. This parameter takes a Boolean value: true, return all values, false, return just the changed values. The default value is false.

Returns

None.

See Also

SetData, Messages.

Rowset Class

Click to jump to top of pageClick to jump to parent topicGetDimFilter

Syntax

GetDimFilter(DimName)

Description

Use the GetDimFilter method to return the name of the current user function (filter) used with the specified dimension.

Parameters

DimName

Specify the name of the dimension for which you want the associated user function (filter).

Returns

A string containing the name of the user function. If there is no filter applied to the dimension, this method returns an empty string.

See Also

SetDimFilter

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

Syntax

GetDimSort(DimName)

Description

Use the GetDimSort to return the current sort settings on the specified dimension.

Parameters

DimName

Specify the name of the dimension for which you'd like the sort settings.

Returns

An array of any. The array contains the same structure as the signature for the SetDimSort method.

Value

Description

Array index 1

IsAscending as Boolean

Array index 2

Key1 as string

Array index 3

IsAscending2 as Boolean

Array index 4

Key2 as string

Array index 5

IsAscending3 as Boolean

Array index 6

Key3 as string

See Also

SetDimSort

Click to jump to top of pageClick to jump to parent topicGetLayout

Syntax

GetLayout(&SlicerArray, &RowAxisArray, &ColumnAxisArray)

Description

Use the GetLayout method to return the current layout for the three axes, (slice, row, and column) on the specified dimension.

Parameters

&SlicerArray

Specify an already instantiated array of string containing the list of fields used on the slice axis.

&RowAxisArray

Specify an already instantiated array of string containing the list of fields used on the row axis.

&ColumnAxisArray

Specify an already instantiated array of string containing the list of fields used on the column axis.

Returns

None.

Click to jump to top of pageClick to jump to parent topicGetRowCount

Syntax

GetRowCount()

Description

 

Use the GetRowCount method to return the total number of rows in the cube collection.

The number of rows is a function of the hierarchy, that is, what is shown or not shown, and filtered values.

Parameters

None.

Returns

An integer.

See Also

GetDimension

Click to jump to top of pageClick to jump to parent topicGetSlice

Syntax

GetSlice(&SliceRecord)

Description

Use the GetSlice method to return the current slice values of all the dimensions.

Parameters

&SliceRecord

Specify an already instantiated record object to hold the values of the slicer record.

Returns

None.

See Also

SetSlice

Click to jump to top of pageClick to jump to parent topicSetData

Syntax

SetData(&DataRowset)

Description

Use the SetData method to populate the data in the cube collection with the data in the specified rowset.

The system extracts only changed values from the rowset, that is, values marked as updated. .

SetData method also writes the changes to the database for any record marked as writable or readable and writable in the analytic type definition, and mapped to the specified cube collection.

Parameters

&DataRowset

Specify the rowset object that contains the data you want to use to populate the cube collection.

Returns

None.

See Also

GetData

IsChanged

Rowset Class

Click to jump to top of pageClick to jump to parent topicSetDimensionOrder

Syntax

SetDimensionOrder(&FieldNames)

Description

Use the SetDimensionOrder method to specify the order of dimensions for this cube collection.

Parameters

&FieldNames

Specify an already instantiated array of string containing the field names that are the dimensions in the cube collection, in the order you want the dimensions.

Returns

None.

See Also

SetDimSort

Click to jump to top of pageClick to jump to parent topicSetDimFilter

Syntax

SetDimFilter(DimName, DimFilter)

Description

Use the SetDimFilter method to set a dimension filter for the specified dimension in the cube collection.

Parameters

DimName

Specify the name of the dimension for which you want to specify a dimension filter.

DimFilter

Specify the name of the dimension filter (user function) that you want to use the dimension.

Returns

None.

See Also

Understanding Dimensions

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

Syntax

SetDimSort(DimName, IsAscending [, Key1, IsAscending2, Key2, IsAscending3, Key3])

Description

Use the SetDimSort method to specify the sorting order for the cube collection.

Key1, Key2and Key3 are optional parameters. If they are not specified, the sorting works as a name sort, that is, it sorts by the name of members in the given dimension, either in ascending or descending order.

If keys are specified, the keys values refer to the names of the cubes to be used as they key. The method orders the members of the dimension based on the value of the cubes for each member. The Boolean parameter IsAscending defines whether sorting should be in ascending or descending order. Up to three sort keys may be specified. Key1 is the primary sort key. Key2 is used to sub-sort any members that have the same key value under Key1, and so on.

The scope of this method is the same as the scope of the AnalyticModel object created in PeopleCode, that is, if the AnalyticModel object was declared with scope Global, this method would have a global scope as well, if it was declared as Local, it would have Local, and so on.

Specifying a null string for DimName or for keys one through three removes the current value as a sort value.

Parameters

DimName

Specify the dimension name that you would like sorted.

IsAscending

Specify if the sort order is ascending or descending. This parameter takes a Boolean value: true if the sort is ascending, false if it's descending.

Key1

Specify the name of a key field by which the sort should be ordered. If you do not specify keys, the sort is ordered by the names of the members in the given dimensions. If you do specify keys, the sort is order by the keys.

IsAscending2

Specify if the sort order for Key1is ascending or descending. This parameter takes a Boolean value: true if the sort is ascending, false if it's descending.

Key2

Specify the name of a key field to be used to sub-sort the primary key field Key1.

IsAscending3

Specify if the sort order for Key2is ascending or descending. This parameter takes a Boolean value: true if the sort is ascending, false if it's descending.

Key3

Specify the name of a key field to be used to sub-sort the primary key field Key2.

Returns

None.

Click to jump to top of pageClick to jump to parent topicSetSlice

Syntax

SetSlice(&SliceRecord)

Description

Use the SetSlice method to specify a slice record for this cube collection.

Parameters

&SliceRecord

Specify an already instantiated record as the record to be used for the slice for the cube collection.

Returns

None.

See Also

GetSlice

Click to jump to top of pageClick to jump to parent topicShowHierarchy

Syntax

ShowHierarchy(DimName, Show, ExpandToLevel)

Description

Use the ShowHierarchy method to either hide or display the cube collection hierarchy.

If there is a tree attached to the dimension, and Show is false, only the detail level members are shown in the Analytic grid. If Show is true, all members including nodes are shown.

When the hierarchy is hidden, the GetData method returns only leaf values. When the hierarchy is displayed, GetData returns node values and leaf values.

The ExpandToLevel parameter expands the hierarchy to the level specified. Level indexes start from 0 , the root level.

For example, if you specify ExpandToLevel as 1, the grid displays the total (root member) and all the detail members in a dimension with no tree attached.

In the following example, if you specify ExandToLevel as 2, the hierarchy would be displayed only to the quarter level, and not to the month level.

ALL_TIME 2003 Q1 Jan Feb Mar Q2 Apr May Jun Q3 . . . . . . Q4 2004 Q1 Q2 Q3 Q4

Parameters

DimName

Specify the name of the dimension for which you want to either display or hide the hierarchy.

Show

Specify whether to display or hide the hierarchy. This parameter takes a Boolean value; true to display the hierarchy, false to hide it.

ExpandToLevel

Specify to what level to expand the hierarchy, as a number.

Returns

None.

See Also

CollapseNode, ExpandNode, GetData.

Click to jump to top of pageClick to jump to parent topicUnsetDimFilter

Syntax

UnsetDimFilter(DimName)

Description

Use the UnsetDimFilter method to remove the filter on the specified dimension for the cube collection.

Parameters

DimName

Specify the name of the dimension from which you want to remove the filter.

Returns

None.

See Also

SetDimFilter

Click to jump to top of pageClick to jump to parent topicUnsetDimSort

Syntax

UnsetDimSort(DimName)

Description

Use the UnsetDimSort method to remove the sorting on the specified dimension for a cube collection. After using this method, the members are returned in the global member order as specified in the analytic model definition.

Parameters

DimName

Specify the name of the dimension from which you want to remove sorting.

Returns

None.

See Also

SetDimSort

Click to jump to parent topicCubeCollection Class Property

In this section we discuss the CubeCollection class property.

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

Description

This property returns a multi-dimensional array of any containing the messages that occurred during execution of the GetData, SetData, and CalculateCube methods.

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.

After you access this property, only new messages are returned, that is, messages are only returned once.

This property is read-only.

See Also

GetData, SetData.

CalculateCube