CellValue (Property)

Applies To:

Embedded Pivot Objects

Description:

Returns the value in a cell that was double-clicked. Accessible for Dashboard Pivot Embedded Sections Objects (ESOs) included in an Interactive Reporting document. You can only use this property when Pivots are active.

Reading the CellValue property is the same as accessing values by clicking cell in a Pivot Embedded Section Object. The CellValue Property is read-only. The property returns a Value of type VARIANT representing the unformatted JavaScript content of the cell. The user must format it using JavaScript. Default value of the property is the value of the cell selected.

If no data exists at the intersection, a catchable “no such property” exception is returned, and the script halts without a try/catch statement. The scripts continues only when the catch is employed.

The CellValue (Property) is available for Interactive Reporting Studio and Interactive Reporting Web Client. It is unavailable for the EPM Workspace or the Jobs/Scheduler.

Action:

Read only, undefined

Example:

This example shows how to return the value of a double-clicked cell. It includes a try-catch statement and the default values.

//Clear all TextBoxes except TextBox5
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ActiveSection.Name
var ActionName = "CellValue"
TextBox1.Text ="Start " + ActionName 
if (TextBox5.Text == "")
{ 
TextBox1.Text ="Step 1a" 
try
{

PivotESOTextBox.Text = "CellValueDefault is: " + ActiveSection.Shapes["Pivot1"].CellValue
}
catch(e)
{
TextBox2.Text = "Caught: " + e.toString()
}
TextBox1.Text ="Step 1b" 
try
{
PivotESOTextBox.Text = PivotESOTextBox.Text + "\r\nCellValuetoString is: " + ActiveSection.Shapes["Pivot1"].CellValue.toString()
}
catch(e)
{
TextBox2.Text = "Caught: " + e.toString()
}
}
else
{ 
TextBox1.Text ="Step 2" 
try
{
ActiveDocument.Sections["Pivot"].Facts.CellValue = TextBox5.Text
}
catch(e)
{
TextBox2.Text = "Caught: " + e.toString()
}
TextBox1.Text ="Step 3a" 
try
{
PivotESOTextBox.Text = "CellValueDefault is: " + ActiveSection.Shapes["Pivot1"].CellValue
}
catch(e)
{
TextBox2.Text = "Caught: " + e.toString()
}
TextBox1.Text ="Step 3b" 
try
{
PivotESOTextBox.Text = "CellValuetoString() is: " + PivotESOTextBox.Text + "\r\n" + ActiveSection.Shapes["Pivot1"].CellValue.toString()
}
catch(e)
{
TextBox2.Text = "Caught: " + e.toString()
}
}
TextBox1.Text ="End " + ActionName 

In this example, these values are returned:

CellValueDefault is: 5361.3

CellValuetoString is: 5361.3