Jump to content

Recommended Posts

Posted

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!

Posted

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

Posted

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

  • 3 years later...
Posted

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

  • 4 years later...
Posted (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 by Prashant S A
Posted (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 by David Boot-Olazabal

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