Jump to content

select one row and mark all rows with the same value in a column


Recommended Posts

This scenario is feasible if you have two data tables and have data relation based on column ID. So if you mark any record in a table visualization, related records will appear in details visualization based on other table. Attached is the dxp for reference.

If you do not want to create other table, you would need to use data function/iron python scripting to achieve your requirement. Because it is not feasible directly to mark all records with same column ID based on one row selected in table visualization. If you have cross table or graphical table where rows with same column ID are grouped together, then you can easily show the marked records in details visualization.

References:

Trigger iron python script using data function:

https://support.tibco.com/s/article/Tibco-KnowledgeArticle-Article-44163

Marking records in data table :

https://spotfired.blogspot.com/2014/02/mark-selected-row.html

https://community.spotfire.com/wiki/how-retrieve-data-marking-selection-using-ironpython-tibco-spotfire

Link to comment
Share on other sites

  • 9 months later...

I have exactly the same question and need to find/create the IronPython solution.  This seems to me like a capability that would be commonly useful actually.  I.e. if I have a data table with a categorical column X, and I mark a set of rows of data, it'd be useful to have a way to expand the marking of rows to include all rows containing one of the columnX values amongst the currently marked records. This can be accomplished by duplication of the data table & management of relations, but this duplication and the navigation becomes pretty hairy and surely will turn-off more "casual" spotfire users.  A single data table with a textbox button to "Expand marked rows" would be simpler and more intuitive I think.  

 

Has anyone tackled this reasonably generic task  (apologies if this is unclear or a repeat question; though I'm an experienced spotfire user, I'm a newbie to this Tibco Community)

 

PS- I don't care at this point whether which column is "columnX" needs to be hard coded or not (presumably it could be specified in a document property too). 

Link to comment
Share on other sites

You can use below script in your action control button in textarea:

 

https://community.spotfire.com/wiki/how-retrieve-data-marking-selection-using-ironpython-tibco-spotfire

 

Above script will capture the marked value in a document property.

 

Then just apply data limit to your final visualization say you marked year 2019 region=US record but you want to show all years region US records then script will save US value in document property and apply below data limit to visualization 

 

"${region}"=US

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