I try to avoid using Eval(Parse()) when ever I can (even though it is fairly often the easiest method). Usually in cases like this (now) I build the expression and evaluate that expression inside the formula
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Bands Data.JMP" );
col_list = {"varnish pct", "ink pct", "solvent pct"};
// 1
sum_expr = Expr(Sum());
For Each({item}, col_list,
Insert Into(sum_expr, Name Expr(As Column(dt, item)));
);
//show(Name Expr(sum_expr));
Eval(EvalExpr(
dt << New Column( "mysum",
Formula(Expr(Name Expr(sum_expr)))
)
));
// 2
col_listing = Transform Each({item}, col_list,
Name Expr(As Column(dt, item));
);
Eval(Substitute(
Expr(dt << New Column( "mysum", Formula(_sums_))),
Expr(_sums_), Substitute(col_listing, Expr(List()), Expr(Sum()));
));
-Jarmo