In my script I use the following to get the list of all columns in a string format:
columnNames = dt << Get Column Names( string );
I need that so I could iterate through them using "For Each" loop:
For Each( {columnName, index}, columnNames, Column( dt, columnName ) << Set Name( columnName ||"SomethingHere" ) );
Now I need to only get selected columns and run the same loop on them.
I know only one way to get selected columns:
columnNames = dt << Get Selected Columns;
but it returns references to columns, not string names. So when I run this then:
For Each( {columnName, index}, columnNames, Column( dt, columnName ) << Set Name( columnName ||"SomethingHere" ) );
it doesn't work.
How do I either
1. Rewrite For Each loop (I'd like to keep using this loop instead of For loop) to accept references to columns as well
or
2. Convert references to columns into a list of strings.
?