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?