FactName (Property)

Applies To:

Embedded Pivot Objects

Description:

Returns the name of the fact to which the value applies. For example, if the value in CellValue corresponds to the name “Amount Sales” in the Facts section of the Pivot Outliner, then FactName is set to “Amount Sales”. When no Fact exists and the property value is retrieved, the property return an empty string.

The FactName property is accessible for the Dashboard Pivot Embedded Sections Objects (ESOs). This property is only available when a Dashboard section containing a Pivot ESO is included in the BI document. It is only functional when the Pivot is in Active mode.

The FactName Property is read-only. Value returned are a string representing the unformatted JavaScript value of the cell. Default value of the property is the name of the fact associated with the cell selected. .

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

Action:

Read only, String

Example:

This example shows how to return the value of the fact that has been double-clicked. It includes a try-catch statements, and a call to the tostring value. In this example, “FactName is: Amount” is returned.

//Clear all TextBoxes except TextBox5

TextBox1.Text = ""

TextBox2.Text = ""

TextBox3.Text = ""

TextBox4.Text = ActiveSection.Name

var ActionName = "FactName"

TextBox1.Text ="Start " + ActionName

if (TextBox5.Text == "")

{

TextBox1.Text ="Step 1"

try

{

PivotESOTextBox.Text = PivotESOTextBox.Text + "\r\nFactName is: " + ActiveSection.Shapes["Pivot1"].FactName

}

catch(e)

{

TextBox2.Text = "Caught: " + e.toString()

}

}

else

{

TextBox1.Text ="Step 2"

try

{

ActiveDocument.Sections["Pivot"].Facts.FactName = TextBox5.Text

}

catch(e)

{

TextBox2.Text = "Caught: " + e.toString()

}

TextBox1.Text ="Step 3"

try

{

TextBox3.Text = "Facts is: " + ActiveDocument.Sections["Pivot"].Facts.FactName

}

catch(e)

{

TextBox2.Text = "Caught: " + e.toString()

}

}

TextBox1.Text ="End " + ActionName