CubeCollection Class Methods
In this section we discuss the CubeCollection class methods. The methods are described in alphabetical order.
Syntax
CollapseNode(DimName, &Node)
Description
Use the CollapseNode method to collapse a node in the dimension specified by DimName.
Parameters
Field or Control |
Definition |
---|---|
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:
|
Returns
None.
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
Field or Control |
Definition |
---|---|
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:
|
Returns
None.
Syntax
DrillOutOfNode(DimName, &Node)
Description
Use the DrillOutOfNode method to collapse the data that you just expanded.
Parameters
Field or Control |
Definition |
---|---|
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:
|
Returns
None.
Syntax
ExpandNode(DimName, &Nodes, ExpandAll)
Description
Use the ExpandNode method to expand the nodes in the specified dimension.
Parameters
Field or Control |
Definition |
---|---|
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
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
Field or Control |
Definition |
---|---|
&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.
Syntax
GetDimFilter(DimName)
Description
Use the GetDimFilter method to return the name of the current user function (filter) used with the specified dimension.
Parameters
Field or Control |
Definition |
---|---|
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.
Syntax
GetDimSort(DimName)
Description
Use the GetDimSort to return the current sort settings on the specified dimension.
Parameters
Field or Control |
Definition |
---|---|
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 |
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
Field or Control |
Definition |
---|---|
&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.
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.
Syntax
GetSlice(&SliceRecord)
Description
Use the GetSlice method to return the current slice values of all the dimensions.
Parameters
Field or Control |
Definition |
---|---|
&SliceRecord |
Specify an already instantiated record object to hold the values of the slicer record. |
Returns
None.
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
Field or Control |
Definition |
---|---|
&DataRowset |
Specify the rowset object that contains the data you want to use to populate the cube collection. |
Returns
None.
Syntax
SetDimensionOrder(&FieldNames)
Description
Use the SetDimensionOrder method to specify the order of dimensions for this cube collection.
Parameters
Field or Control |
Definition |
---|---|
&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.
Syntax
SetDimFilter(DimName, DimFilter)
Description
Use the SetDimFilter method to set a dimension filter for the specified dimension in the cube collection.
Parameters
Field or Control |
Definition |
---|---|
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.
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
Field or Control |
Definition |
---|---|
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.
Syntax
SetSlice(&SliceRecord)
Description
Use the SetSlice method to specify a slice record for this cube collection.
Parameters
Field or Control |
Definition |
---|---|
&SliceRecord |
Specify an already instantiated record as the record to be used for the slice for the cube collection. |
Returns
None.
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
Field or Control |
Definition |
---|---|
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.
Syntax
UnsetDimFilter(DimName)
Description
Use the UnsetDimFilter method to remove the filter on the specified dimension for the cube collection.
Parameters
Field or Control |
Definition |
---|---|
DimName |
Specify the name of the dimension from which you want to remove the filter. |
Returns
None.
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
Field or Control |
Definition |
---|---|
DimName |
Specify the name of the dimension from which you want to remove sorting. |
Returns
None.