Skip to main content

Change column position

Hello, i need help if it is possible.
I have 1 big batabase (like 400 columns and 8mil rows). I need to pick 120 specific columns a array theirs position. Im trying to do this using Extraction with task.AddField function and it work pretty good. But there is a problem i cant solve. When I save this new database using this Extraction and want to do some other activities with it (like new Extraction etc.) all arangement of colums will return to the state of the first big database (according to its history).
Is there any option to set position of columns with task.AddField ignoring history of the original database? Or any other option to array columns to a specific order that will be stable?
Thank you very much for your help
Jan Knize

Brian Element Wed, 01/11/2017 - 07:19

Hi Jan,

I had never noticed that before but I tried it and that is true.  That is not what I would expect but that is what is going on.  I will send over an email to a friend at IDEA about this and see what they have to say.  I guess the only way around this is to store the order of your fields in an array and then populate the task.AddField from the array each time you do an extract.  Sorry right now there isn't way that I know of to get around this.

Good luck.

Brian