Hi,
I have the following simplified script in a table:
dataTable = Current Data Table();
If( !Contains( strColNames, "pears" ),
dataTable << New Column( "pears",
numeric,
"Continuous",
Formula( :"apples" + 2 )
)
);
When I copy this script to a new table (using ctrl-c ctrl-v), which already has a filled column named "apples", the script ends up as:
dataTable = Current Data Table();
If( !Contains( strColNames, "pears" ),
dataTable << New Column( "pears",
numeric,
"Continuous",
Formula( As Column() + 2 )
)
);
The reference to the column "apples" is replaced in the formula by the As Column() statement. The script no longer works. It turns out that removing the quotation marks from the reference to the column "apples" in the formula solved the problem.
I consider this a bug. Is it, or is this expected behaviour?
Regards, Radko