I have never used Application Builder, but you could possibly user Row State Handlers.
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt_summary = dt << Summary(
Group(:sex),
Mean(:height),
Mean(:weight),
Freq("None"),
Weight("None"),
Link to original data table(0)
);
Eval(EvalExpr(f_summary = Function({a},
f = dt_summary << Get Selected Rows;
group_selected = dt_summary[f, "sex"];
expr(dt) << Select Where(Contains(group_selected, :sex));
)));
rs_summary = dt_summary << make row state handler(f_summary);
nw = New Window("demo",
gb1 = dt << Graph Builder(
Size(529, 457),
Show Control Panel(0),
Variables(X(:weight), Y(:height), Color(:sex)),
Elements(Points(X, Y, Legend(4)))
),
gb2 = dt_summary << Graph Builder(
Size(535, 451),
Show Control Panel(0),
Variables(X(:sex), Y(:"Mean(height)"n), Y(:"Mean(weight)"n, Position(1))),
Elements(Bar(X, Y(1), Y(2), Legend(4), Label("Label by Value")))
);
);
nw << On Close(rs_summary = .);
Other option could be to use Graph Script:
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt_summary = dt << Summary(
Group(:sex),
Mean(:height),
Mean(:weight),
Freq("None"),
Weight("None"),
Link to original data table(0)
);
nw = New Window("demo",
gb1 = dt << Graph Builder(
Size(529, 457),
Show Control Panel(0),
Variables(X(:weight), Y(:height), Color(:sex)),
Elements(Points(X, Y, Legend(4)))
),
gb2 = dt_summary << Graph Builder(
Size(535, 451),
Show Control Panel(0),
Variables(X(:sex), Y(:"Mean(height)"n), Y(:"Mean(weight)"n, Position(1))),
Elements(Bar(X, Y(1), Y(2), Legend(4), Label("Label by Value")))
);
);
Eval(EvalExpr(Report(gb2)[FrameBox(1)] << Add Graphics Script(
f = dt_summary << Get Selected Rows;
group_selected = dt_summary[f, "sex"];
expr(dt) << Select Where(Contains(group_selected, :sex));
)));
One more option would be to use Virtual Joins but these would require you to have data tables saved somewhere.
-Jarmo