Jump to content

How can we change Data Table in a Table visualization based on Filter Value


Mansi Joshi

Recommended Posts

Hi,

I have 4 filter values A,B,C,Din a column and there are corresponding datatable 1,2,3,4 associated with those values.

How can I changedatatable in TABLE Visualizationbased on users selection filter value.

Eg: If user selects A from filter then TABLE visualization must change data table to 1

Similiarly for B from filter then TABLE visualization must change data table to 2 etc.

Can anyone please provide the solution.

 

Thanks,

Mansi Joshi

Link to comment
Share on other sites

First create a document property with Drop down values.

 

from Spotfire.Dxp.Application.Visuals import VisualContent

tbl = currentTableVisualization.As[VisualContent]()

newtbl = Document.Data.Tables.Item[DOCUMENT PROPERTY VALUE ]

tbl.Data.DataTableReference=newtbl

tbl.AutoConfigure()

tbl.ApplyUserPreferences()

 

CRETAE TWO INPUTS for this script

1]DOCUMENT PROPERTY VALUE: select property value which has table name

2]currentTableVisualization : table visualization

Then trigger this script when for the value change in the doc property

Link to comment
Share on other sites

  • 11 months later...

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...