The reason this happens is due to how JMP handles scope. When you give an unscoped variable (is not of the form ns:var, :var, ::var), then JMP has a sequence to try to find the proper scope for the variable of interest. It goes something like this
- Check local namespace -- if found, done
- Check Current Data Table columns, if found, done
- Check here namespace -- if found, done
- Check global namespace -- if found, done
Since you did not define "Column A" anywhere in your script, the only valid name for which "Column A" applies is the column name.
Inside of a "For Each Row" statement the order is to check column names first (higher precedence than any other scope).
Update:
Note that the above list is for explicitly unscoped variables without any 'unscoped variable handling' -- that is, no "Names Default to Here( 1 )" line. Note that if you have that line starting the script then it does not affect the data table, as the unscoped "ColumnA" variable only ever gets placed within the Here namespace. JMP doesn't do scope-walking to see if it can find a "ColumnA" variable in the various listed namespaces above.
I've included a picture of the most common way of attaching a script to an addin -- this is what I'm assuming you're doing. Notice that by default the line 'Use the "Here" namespace for unqualified JSL variable names' is checked -- unqualified means has no colon (unscoped). This check-box is forcing JMP to only look at Here:ColumnA when seeing the unscoped variable. You need to run the script without any automatic scope control to work as it does when run as a standalone.
Addin scripts by default link unscoped variables to the "Here" namespace, making it so that unscoped column names don't work