Hi All,
I am trying to use jsl to rename the column name of a datatable using rows value from row that met predefined criteria.
My script is as followed:
dt = Open();
Current Data Table() << set name( "ABC" );
dt = Data Table( "ABC" );
lastcol = N Col( dt );
header=dt<<Get Rows Where (:(2)=="Colour"); // this is the criteria, i wanted to identify the row where the value in column2 is "Colour"
For( i = 2, i <= lastcol, i++,
Column( i ) << set Name( Column( i )[header] )
);
unfortunately this method doesnt work. Can anyone please guide or share me what's wrong with the script and how can i achieve what i want? Thanks a lot!