Andrew Lewis 4 Posted November 28, 2016 Posted November 28, 2016 I would like to change the default order of columns so that whenever I open a new tablethe columns show in a order I specify and not the order created (this also applies to the pop-up variable selectionmenus). Of course, I can right click within an existingtable and change the order, ie, select Properties > Columns and then change the display order of columns for that table. But the next table I createhasn't changed and I have to repeat the process. So... is there a way to change the underlying column order so that everytime I create a new table or chart, the column order is the same , ie, at thenew order that I have created thanks!
Norbert Ledenyi Posted November 29, 2016 Posted November 29, 2016 Hi Andrew The table plot is picking up the data table's column order. I'm not aware of a way of changing the data table's column order when it's already loaded into Spotfire, so you need to go one level deeper. So for - in memory connection: go to the Information Designer and change the column order for the Information Link - in database connection: wirte a custom query with your desired column order when you load the data - flat files: change the column order in the flat file (excel, csv, etc.) Alternatively when you want to create a new table plot duplicate the already existing one (right click - Duplicate Visualisation) so it would pick up the column order you already defined, or you can also create a table plot with an action control (=IronPython script) which will have the power still within the script to define your own column order (ie based on column property what you define so it's not hardcoded into the script and more flexible. The last approach is definitely the most work, but if you are interested let me know and I can help you to get started. Regards, Norbert
Martin Quintal Posted November 29, 2016 Posted November 29, 2016 I think this may be what you are looking for go to Edit > Column Properties > "Select Column you want sort saved as" > Hit sort order in the middle of the page > Custom Sort Order > set it up how you wish. that should default it now
Norbert Ledenyi Posted November 29, 2016 Posted November 29, 2016 that's for sorting values within a column and not for sorting the columns themselves
Anas Ghannam Posted April 27, 2020 Posted April 27, 2020 Hi Norbert, Your last comment was the exact same thing we are trying to achieve where we need to sort the order of the columns in the data table based on column property values sort. Is there an available script to do that, can you help us in it
Prashant S A Posted July 11 Posted July 11 Hi Anas, I am looking for the same, did you get solution to "How to sort columns"?
David Boot-Olazabal Posted July 11 Posted July 11 Hi Prashant, Would this post be of help? https://spotfired.blogspot.com/2022/10/column-custom-sort-order.html Kind regards, David
Prashant S A Posted July 12 Posted July 12 (edited) Hi David, Thanks for looking into it. Unfortunately, this does sorting for column values but not the column names list present inside Doc property. I am looking into "How to sort columns" when used inside document property(set property through column selection)? Edited July 12 by Prashant S A
David Boot-Olazabal Posted July 15 Posted July 15 (edited) Hi Prashant, Hmm, right I see. I thought at first glance it would take the columns and order it, but it doesn't do that. Sorry for that. With respect to the order of the columns, how would you like them reordered? Kind regards, David Edited July 15 by David Boot-Olazabal
David Boot-Olazabal Posted July 15 Posted July 15 Hi Prashant, I have asked my colleagues if changing the column order is possible at all, using our API (used in iron python and action mods alike). Unfortunately, this is not possible at the moment. There is an existing enhancement request though, which you could vote for: https://ideas.spotfire.com/ideas/TS-I-7740. Kind regards, David
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