SetDimSort method: CubeCollection class
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
| Parameter | Description |
|---|---|
|
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.