This code works because I am explicitly writing ":WaferID" inside of the Where(...) clause:
= Associative Array(byPara) << GetKeys();
New Window("Test", vlb = V List Box(
dt << Fit Group(
For(iC = 1, iC <= NItems(colParaList), iC++,
Oneway(Y(Eval(colParaList[iC])), X(splitPara)) ),
<< {Arrange in Rows(1)},
Where(:WaferID == "001"),
SendToReport( Dispatch( {}, "Fit Group WaferID=001", OutlineBox, {Close( 1 )} ) ) ))
);// Example Parameters<BR />colParaList = {Column(dt, "Para1"), Column(dt, "Para2"), Column(dt, "Para3")};
splitPara = Column(dt, "Site");
byPara = Column(dt, "WaferID");<BR /><CODE class="language-jsl"><BR />byParaValues
This code doesn't work because I am instead using Eval(byPara).
// Example Parameters<BR />colParaList = {Column(dt, "Para1"), Column(dt, "Para2"), Column(dt, "Para3")};
splitPara = Column(dt, "Site");
byPara = Column(dt, "WaferID");
byParaValues = Associative Array(byPara) << GetKeys();<BR />New Window("Test", vlb = V List Box(<BR /> dt << Fit Group(<BR /> For(iC = 1, iC <= NItems(colParaList), iC++, <BR /> Oneway(Y(Eval(colParaList[iC])), X(splitPara)) ), <BR /> << {Arrange in Rows(1)}, <BR /> Where(Eval(byPara) == "001"), <BR /> SendToReport( Dispatch( {}, "Fit Group" || Char(Eval(byPara) << GetName()) || "=" || Char(byParaValues[1]), OutlineBox, {Close( 1 )} ) ) )<BR /> )<BR />);
Why does one of the two work, but the other doesn*t? In my expierience it also doesn't work if I replace "Eval(byPara)" by "byPara".
My goal is to write it similarly to the second version because the script cannot assume what the 'byPara' is going to be, so it should be general. Is there a way to achieve something like this?
What are you trying to do? Run Oneway analysis over few different columns, collect those analyses to Fit Group, apply Where to limit data into single group and close one outline box? Also, which JMP version are you using?
I am trying to run Oneway analysis over multiple Y-parameters and multiple By-parameters, however I want the created FitGroups to be first grouped by the Y parameter and then by the By parameters. Thus both the Y and By parameternames need to be written into variables.
I am using JMP 19.
Thanks already.
What is the final layout you wish to have? Have you tried stacking your data and then running Fit Y by X?