To debug your script, you can check what the EvalExpr() part does return
FactorList = {"SILICA", "SILANE"};
i = 1;
term_expr = Eval Expr(obj << Term Value(Expr(FactorList[i])(5, Min(-10), Max(6), Lock(1), Show(1))));
show(term_expr);
it is something like this which is incorrect syntax
term_expr = obj << Term Value("SILICA" << {5, Min(-10), Max(6), Lock(1), Show(1)});
And here is one way of dealing this
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Tiretread.jmp");
obj = dt << Profiler(
Y(:Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS),
Desirability Functions(1)
);
terms = {"SILICA", "SILANE"};
For Each({term}, terms,
Eval(Substitute(
Expr(obj << Term Value(_term_(5, Min(-10), Max(6), Lock(1), Show(1)))),
Expr(_term_), Name Expr(AsColumn(dt, term));
));
);
-Jarmo