Alternatively you can use
OldName = Char(Column name(i));
Then you do not need the Expr() within Substr().
The reason for not working without Char() (or expr) is that Column name() returns a name value, not a quoted string. See more in the scripting guide (under "obtaining column names" p. 121, JMP 9)
Message was edited by: MS