either Eval(Substitute(Expr(...)))
... or Eval(Eval Expr( Expr()...))
Tips and Tricks - best practice with JMP/JSL
Think of Eval (Eval Expr( Expr()...))as :
please search for Expr() and Eval Expr() .... before you Eval() the whole thing.
Unfortunately, all 3 of them start with E... , so it's a bit tricky to remember them with the correct meaning.
The 4th E... is Name Expr() - @jthi used it in the for loop to convert the Strings into columns (:column) *)
... and we need it to get Y(...) instead of an error message : )
*) Fortunately, Control Chart Builder
accepts strings as alternative to columns.
So one can directly convert the list of column names to a Y() of column names by replacing the head via
Substitute Into:
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
tmp = dt << Get Column Names("Continuous", String);
Substitute Into(tmp, Expr(List()), Expr(Y()));
Eval(Eval Expr(
ccb = dt << Control Chart Builder(
Variables(Subgroup(:age), Expr(Name Expr(tmp))),
Show Control Panel(0),
Chart(Position(1), Limits(Sigma("Standard Deviation"), Spec Limits(1))),
Chart(Position(2), Points(Statistic("Standard Deviation")), Limits(Sigma("Standard Deviation"))),
Show Control Panel(0)
)
));