I have a big table (>100 columns) and 1,5M rows. I display the full table, and it is quite a mess for users that are only interested by few columns at a time (but never the same columns, never the same users). They would like to be able to select the columns to see.
I tried a pivot table with rows set by default at ID level (primary key) + with a property control for cells (so that it is possible to let the user choose his columns in a list then) but ... with 1,5M rows in a pivot table, it is too long to load it. I would like to be able to do the same kind of things but in a table
Concretely, it is just to have "expression" window for the select of columns as we have for the others vizualizations insteadd of the current display, it would enable to select the columns as before and/or to write a property control.
There are 2 ways to change data table columns to display via property control.
Create a Text area and add a Property Control of type List box (multiple select)
In the Property Control setting:
Add a new Document Property of type String. Let's name it "columnSelection".
Set property value through column selection
Select columns to include in the Property Control
Now click "Script" button and select "Execute the script selected below:" and click New
Add script parameter of type Visualization and select your data table. Let's name it "tablePlot"
Paste-in the script below
Script
#get document property
from Spotfire.Dxp.Data import DataPropertyClass
selection = Document.Data.Properties.GetProperty(DataPropertyClass.Document, "columnSelection").Value
#apply column selection to table
from Spotfire.Dxp.Application.Visuals import *
tablePlot.As[TablePlot]().Columns.Clear()
tablePlot.As[TablePlot]().Columns.AddRange(selection)
This method is described in this community article: https://community.tibco.com/wiki/example-script-modify-which-columns-are-shown-table-plot
Hello, it works ! thank you very much.
Brgds,
Guillaume
De : TIBCO Software Inc
Envoy�� : mardi 15 juin 2021 00:47
�� : Jaworski, Guillaume (DZ CZ WD) - AF
Objet : Arnaud Varin responded to idea TS-I-8254 Property control to enable customization of columns in tables
Hello Guillaume,
There are 2 ways to change data table columns to display via property control.
Method 1: Selecting one or multiple columns to display on a table visualization
Create a Text area and add a Property Control of type List box (multiple select)
In the Property Control setting:
Add a new Document Property of type String. Let's name it "columnSelection".
Set property value through column selection
Select columns to include in the Property Control
Now click "Script" button and select "Execute the script selected below:" and click New
Add script parameter of type Visualization and select your data table. Let's name it "tablePlot"
Paste-in the script below
Script
A DXP example is attached for this method.
Method 2: Selecting groups of columns to display on a table visualization
This method is described in this community article: https://community.tibco.com/wiki/example-script-modify-which-columns-are-shown-table-plot
Please let me know if these method solve your request.