Dashboard Pivot Embedded Section Object (ESO) in Active Mode only
Returns a JavaScript array (and not an Interactive Reporting Object Model array) of side label values . Each array element contains the value of the label at successively lower levels. For example, if there are two side labels in the Pivot, Year and Month, then the array element at index 1 in the array might contain “2001” and the next element at index 2 would contain a value like “November”. Because JavaScript arrays are zero-based, the element at index 0 (zero) contains an empty string value.
The SideLabelValues (Array) is accessible for a Dashboard Embedded Section Object (ESO) only. It is available even if the Pivot contains no data. In addition, it is functional only when the Pivot is in Active mode.
The SideLabelValues (Array) is refreshed when a Pivot ESO cell is clicked in the user interface, or the OnCellDoubleClick() method used. An array is used due to the uncertainty of the SideLabel hierarchy. The array forces the user to get the value to ensure that it is current. It avoids using the standard x.y.z.name structure of an object that could become ambiguous or incorrect given changes of the Pivot side labels.
The array is read-only. Changing array values does not effect Pivot side label values.
The array returns a string which reflects the names of the Pivot side labels in sequence. Values are returned using the length accessor. JavaScript arrays are normally 0-based. However, the ]0] value always returns an empty string. If there are three sideop labels, the array returns … SideLabelValues[0] =<empty string>, …SideLabelValues[1] =<First Side Label Name>, …SideLabelValues[2] =<Second Side Label Name>, …SideLabelValues[3] =<Last Side Label Name>.
If a Pivot side label does not exist, the SideLabelValues[1] returns “undefined”; however no exception is generated and scripts execute. The same behavior occurs when values are called that exceed the length of the array. The array behaves the same regardless of data at the selected intersection.
Values returned by the array are unformatted. Use scripts to apply formatting.
Iterating through the SideLabelValues (Array) does not persists (dirty) in the document or retrieve the value. The value in the array reflects the names of the Pivot side labels in sequence.
Separately from Pivot values in the document
Within the application
The SideLabelValues (Array) is available in Interactive Reporting Studio and the Interactive Reporting Web Client. It is unavailable in EPM Workspace.
This example shows how to access top label array data:
var ActionName = "SideLabelValues Array"
TextBox1.Text ="Start " + ActionName
PivotESOTextBox.Text = PivotESOTextBox.Text + "\r\nSideLabelValues Default is: " + ActiveSection.Shapes["Pivot1"].SideLabelValues
PivotESOTextBox.Text = PivotESOTextBox.Text + "\r\nSideLabelValues length is: " + ActiveSection.Shapes["Pivot1"].SideLabelValues.length
PivotESOTextBox.Text = PivotESOTextBox.Text + "\r\nSideLabelValues[0] is: " + ActiveSection.Shapes["Pivot1"].SideLabelValues[0]
PivotESOTextBox.Text = PivotESOTextBox.Text + "\r\nSideLabelValues[1] is: " + ActiveSection.Shapes["Pivot1"].SideLabelValues[1]
PivotESOTextBox.Text = PivotESOTextBox.Text + "\r\nSideLabelValues[2] is: " + ActiveSection.Shapes["Pivot1"].SideLabelValues[2]
PivotESOTextBox.Text = PivotESOTextBox.Text + "\r\nSideLabelValues[3] is: " + ActiveSection.Shapes["Pivot1"].SideLabelValues[3]
TextBox2.Text = "Caught: " + e.toString()
TextBox1.Text ="End " + ActionName
The results of the above script are displayed as follows:
SideLabelValues Default is: ,4 SideLabelValues length is: 2 SideLabelValues[0] is: SideLabelValues[1] is: 4 SideLabelValues[2] is: undefined SideLabelValues[3] is: undefined