You can build something like this using Workflow builder, so depending on what you are doing utilizing that might be a good idea (and it is good practice on using JMP).
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");
run_custom_dist = Expr(
vlb = V List Box(
dist = dt << Distribution(
Ignore Platform Preferences(1),
Continuous Distribution(
Column(Eval(mycol)),
Quantiles(0),
Summary Statistics(0),
Horizontal Layout(1),
Histogram(0),
Vertical(0),
Outlier Box Plot(0),
Process Capability(Use Column Property Specs, Process Capability Analysis(Nonconformance(0)))
)
),
ccb = dt << Control Chart Builder(
Show Two Shewhart Charts(0),
Include Missing Categories(0),
Show Limit Summaries(0),
Show Capability(0),
Variables(Y(Eval(mycol))),
Chart(Points(Statistic("Moving Range")), Limits(Sigma("Moving Range"))),
Show Control Panel(0)
)
);
// modify axis
Report(dist)[Outline Box("Histogram"), AxisBox(1)] << Min(100) << Max(130) << Inc(1) << Minor Ticks(5);
// Filter table boxes
Report(dist)[Outline Box("Within Sigma Capability"), Table Box(1)] << Filter Where(Contains({"Cpk", "Cp"}, Index));
Report(dist)[Outline Box("Overall Sigma Capability"), Table Box(1)] << Filter Where(Contains({"Ppk", "Pp"}, Index));
Report(dist)[Outline Box("Process Summary"), Table Box(1), String Col Box(1)] << Set Heading("Stat");
Report(dist)[Outline Box("Process Summary"), Table Box(1), Number Col Box(1)] << Set Heading("Value");
Report(dist)[Outline Box("Process Summary"), Table Box(1)] << Filter Where(Contains({"LSL", "Target", "USL", "N", "Sample Mean"}, Stat));
nw = new window("",
vlb
);
);
nw = New Window("UI",
H List Box(
Panel Box("Pick Columns",
window:fcs = Filter Col Selector(dt, << Character(0))
),
Panel Box("Cast",
Lineup Box(N Col(2),
Button Box("Column", << Set Function(function({this},
(this << sib) << Append(window:fcs << get selected)
))),
window:clb = Col List Box(dt, Min Items(1), Max items(1), N Lines(2), << Modeling Type({"Continuous"}))
)
),
Panel Box("Actions",
Lineup Box(N Col(1),
Button Box("OK",
sel = window:clb << get items;
If(N Items(sel) > 0,
mycol = sel[1];
run_custom_dist;
window:fcs << close window;
);
),
Button Box("Cancel", window:fcs << close window);
)
)
)
);
Write();
How something like this should be used is totally up to you, for me it would maybe make most sense to have a workflow for this (fixing the distribution could be a bit difficult without JSL for workflow though) OR create an add-in which user could run on their own table as needed. For add-in purposes I would most likely let user select more than one column or utilize column switcher and it would be a good idea to implement some extra checks (is table open, do the selected columns have spec limits and so on).
Edit: Fixed hard-coded value from Control Chart Builder
-Jarmo