Jump to content

How to get the value of Calculated Column in Graphical Table.


Arunabha Mahajan

Recommended Posts

Hi,

 

I have preparedgraphical table with CaluclatedValue column and Sparkline. Now I would need to call script as soon as I select one value from the Calculated Value Column. So to do that I have written a Script to attached with the Actions section of Calculated Value Column. But in the script I am unable to access the Value selected in the Calculated Value Column. Could you please let me know how can I access the Value in Calculated Value Column and as well as If i want to access the currently selected value on the Calculated column.

I could access the expression of Caluclated Value Column but unable to access the exact value selected.

Also Please let me know how can i access the CategoricalAxis and its value of a Graphical Table

My Script

 

from Spotfire.Dxp.Application.Visuals.Miniatures import GraphicalTable, CalculatedValueAxis

from Spotfire.Dxp.Application.Visuals import VisualTypeIdentifiers

from Spotfire.Dxp.Data import *

for vis in Document.ActivePageReference.Visuals:

if vis.TypeId == VisualTypeIdentifiers.GraphicalTable:

#define Script Parameter

gtable = vis.As[GraphicalTable]()

#cursor = DataValueCursor.CreateFormatted(gtable.Columns[1])

for col in gtable.Columns:

#Calculated Value Columns

print col.Visualization.TypeId.ToString()

if col.Visualization.TypeId == VisualTypeIdentifiers.CalculatedValueMiniatureVisualization:

try:

vExp = col.Visualization.ValueAxis.Expression

valuecol = col.Title

 

except:

0

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...