Insert one expression into another using Eval Insert, Eval Expr, Parse, and Substitute
You will have to evaluate the references. Here is one example
Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
col1 = "height";
col2 = "weight";
Eval(Substitute(
Expr(dt << New Column("Mult", Numeric, Continuous, Formula(
_col1_ * _col2_
))),
Expr(_col1_), Name Expr(AsColumn(dt, col1)),
Expr(_col2_), Name Expr(AsColumn(dt, col2)),
));
-Jarmo