The text used in filter isn't being evaluated so it will be left as sampleName. Here is one way how you could evaluate it
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
Column(dt, 2) << Set Name("shirt");
Column(dt, 3) << Set Name("SAMPLE_NAME");
Column(dt, 4) << Set Name("LAB_L");
dt_summary = dt << Summary(
Group(:SAMPLE_NAME),
Min(:LAB_L),
Max(:LAB_L),
Freq("None"),
Weight("None"),
Link to original data table(0),
output table name("Summary of Big Class grouped by SAMPLE_NAME")
);
nw = New Window("whiteshirts - Variability Chart",
V List Box(
For Each Row(
dt_summary,
sampleName = Column(dt_summary, "SAMPLE_NAME")[Row()];
grandMin = Column(dt_summary, "Min(LAB_L)")[Row()];
grandMax = Column(dt_summary, "Max(LAB_L)")[Row()];
Print(sampleName, grandMin, grandMax);
/*Text Box( "Where(:SAMPLE_NAME == " || char(sampleName) || ")", <<Set Wrap( 1903 ) );*/
Print("sampleName is " || sampleName);
Eval(EvalExpr(
dt << Variability Chart(
Y(:LAB_L),
Model("Main Effect"),
X(:shirt),
Variability Analysis(
:LAB_L,
Std Dev Chart(0),
AIAG Labels(0),
Show Box Plots(1)
),
Where(:SAMPLE_NAME == Expr(sampleName)),
SendToReport(
Dispatch(
{"Variability Gauge Analysis for LAB_L", "Variability Chart for LAB_L"},
"2", ScaleBox,
{Add Ref Line(grandMin, "Solid", "Medium Dark Red", "", 2),
Add Ref Line(grandMax, "Solid", "Medium Dark Red", "", 2),
Label Row({Show Major Grid(1), Show Minor Grid(1)})}
)
)
);
));
);
)
);
-Jarmo