Cory Lim Posted July 15, 2021 Share Posted July 15, 2021 Hi, I have done up some filters and visualisations for a particular dataset that I'm working with. I wish to create an additional dataset, which is essentially a copy of the original, so as to change the data connection source. However, when I try to change the 'Data' property of my visualisation to the new dataset, it resets the visualisation and filters, even though the data is exactly the same. Can I check if there's any way to change the data without having to create the entire visualisation from scratch Thanks! Link to comment Share on other sites More sharing options...
Kirsten Smith (she/her) Posted July 16, 2021 Share Posted July 16, 2021 What version are you working with We made improvements to that issue in recent versions. Link to comment Share on other sites More sharing options...
Eszter Kovacs Posted July 26, 2021 Share Posted July 26, 2021 Dear Kirsten, as Cory mentioned, this was fixed in a newer version. Anyway, here is a workaround which will solve your issue also with the old version. Please see below the description for a basic iron python script: When you are changing the data table for a given visual in an older version you lose all the setting even though it has the same columns, you have to configure it from scratch. Solution If you change the data table using Ironpython it will keep the setting. You can either change the data table for a given visual or for the whole page. Change the data table for a given visual only- Script: from Spotfire.Dxp.Application.Visuals import * visual.As[Visualization]().Data.DataTableReference = dataTable There are two script parameters needed: visual (Type: Visualization): add the visual where you want to change the data table dataTable (Type: DataTable): add the new dataTable to be used by the above defined visual Attached a screenshot. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now