I would like to rename column name depending on some condition using a for loop with a if conditional.
But doesn't work.
If I set up the function out of the for loop then no issue.
code as below
For( i = 1, i <= 100, i++,
If(i > 0 ,
Column(i) << set name( char(munger(Column name(i), 1, "::try::", "-" ) ) ) );
The Column Name() function returns an expression, not a literal string. So if you use:
Column(i) << set name( char(munger(char(Column name(i)), 1, "::try::", "-" ) ) ) );
it should work