Mar 4, 2015

Assingn table filtered value to parameter from column in Spotfire using python script

import Spotfire.Dxp.Data.DataTable
from Spotfire.Dxp.Data import *
from Spotfire.Dxp.Data import DataValueCursor
dataTable = Document.ActiveDataTableReference
rows = Document.ActiveFilteringSelectionReference.GetSelection(dataTable).AsIndexSet()
for row in rows:
 for column in dataTable.Columns:
  if (column.Name == 'Analysis_Jobs_ID'):
   Document.Properties.Item["Jobid"]=(column.RowValues.GetFormattedValue(row))






----------------------------
Jobid is a parameter





Feb 18, 2015

Page navigation with pything script on spotfire

Document.ActivePageReference = Document.Pages[8];
Document.Properties.Item["pagenumber"]=7

Nov 6, 2014

how to pass multiple values using parameter to spotfire chart

"$map("${multiselectlist}", ",")"~=[ParentNode]

Oct 31, 2014

Python script for Barchart label change percentage/value

from Spotfire.Dxp.Application.Visuals import BarChart
from Spotfire.Dxp.Application.Visuals import LabelInformationType
from Spotfire.Dxp.Application.Visuals import BarChartOrientation
from Spotfire.Dxp.Application.Visuals import StackMode

barChart=viz.As[BarChart]()
if dollor=="yes":
barChart.StackMode=StackMode.Stack
barChart.SegmentLabelInformationType=LabelInformationType.Value
else:
barChart.StackMode=StackMode.Stack100Percent
barChart.SegmentLabelInformationType=LabelInformationType.Percentage