Skip to main content

Scripting for column order

Hi folks,
I'm writing a script that involves several summarizations.
In some cases, the output rearranges the fields/columns in a way that is not very user friendly.
Is there any way of specifying the order of the fields/columns of the output file via the script?
Thanks,
Phil

Brian Element Thu, 06/01/2017 - 19:20

Hi Phil,

Unfortunately there isn't, but there is a work around that I have used assuming that the fields names are always the same, if they are different there is no way this will work.

I will use the Sample-Bank Transactions.IMD file as an example. 

Here the fields have been rearrangd.

Save the view.

I will reset the view on the file.

I then use this code to change the view to the new one:


Sub Main
	Client.OpenDatabase "Sample-Bank Transactions.IMD"
	Client.OpenView "Other.ILB\Test.VW2"
End Sub

pcallan0 Thu, 06/08/2017 - 11:12

Hi Brian,
That works a treat. Thanks a million.
 
Phil