Can the calculations of these two steps be modified to be completed in one step?Thanks Experts!
dt=Open("$SAMPLE_DATA/Big Class.jmp");
ca="A";If(Is Missing(Try(Column(ca)<<GET name="">=lag(height,1),weight) );Current Data Table()<<RUN formulas="">9,round(sum(A[Index(Row()-9,Row())])/sum(B[Index(Row()-9,Row())]),2) ));Current Data Table()<<RUN formulas="">9,sum(weight[Index(Row()-9,Row())]&height[Index(Row()-9,Row())]>=height[Index(Row()-10,Row()-1)])/sum(weight[Index(Row()-9,Row())]&height[Index(Row()-9,Row())]<HEIGHT></HEIGHT></RUN></RUN></GET>

Automation and ScriptingRe: Can the calculations of these two steps be modified to be completed in one step?(assuming your goal is either speed, or easier to read code...)
Column formulas are not magic. They are not faster than JSL. They are JSL.
OK, they can be a little bit magic; JMP's engine that evaluates columns does figure out which columns are dependent on other columns and evaluate the not-dependent formulas first. But that never happens here since the formulas are deleted.
Since you are creating / running / deleting the formula to populate a column, four times, you might want to try a single JSL loop with the four inner statements inside. Be sure to use the <<
Re: Can the calculations of these two steps be modified to be completed in one step?none of the weights is empty.
weight[Index(Row()-9,Row())]&height[Index(Row()-9,Row())]>=height[Index(Row()-10,Row()-1)]
can be reduced to
height[Index(Row()-9,Row())]>=height[Index(Row()-10,Row()-1)]
or maybe: you wanted to calculate something else?
selection of A & B.
comparison of C&DD:

let's challenge it:
a)
weight[11] = 500;
b)
current data table()<< add rows(10);
height[41::50] = 70;
weight[41::50] = 1;
Re: Can the calculations of these two steps be modified to be completed in one step?I need this form composed of several formulas and don't want any loops in it.
Thanks Experts!
aaa="";
current data table(dt);Eval(Parse("Column(dt,\!"ABC\!")<<FORMULA>0));</FORMULA>