Here is a quick example. I would suggest making the referencing more robust and possibly utilizing local data filter instead of global. Also you should parametrize this (wrapping, instructions, ...)
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Animals.jmp");
nw = New Window("",
V List Box(align("center"),
Text Box("Animals Study Evaluation", << Set Base Font("Title")),
Text Box("Add-in version 1.0", << Set Base Font("Heading")),
Text Box("Documentation report: xxxxxx", << Set Base Font("Heading")),
Panel Box("Study Selections",
Button Box("Start Over", f << Clear);
f = dt << Data Filter(
Conditional,
Show Controls(0),
Show Modes(0),
Show Histograms and Bars(0),
Add Filter(
columns(:season, :species, :subject),
Where(:season == "fall"), // force conditional filter order
Where(:species = "COYOTE"),
Where(:subject= "1"),
Display(:season, N Items(4)),
Display(:species, N Items(2), "List Display"),
Display(:subject, N Items(3), "List Display")
)
)
)
)
);
Window("")["Data Filter",BorderBox(6)] << Sib Prepend(
V List Box(
Text Box("Selection of Seasons", << Set Font Size(12), << Set Font Style("Bold Italic")),
Text Box("Please select which seasons to use for the analysis. Multiple seasons can be selected by holding 'ctrl' down while pressing multiple seasons.", << Set Wrap(400))
)
);
Window("")["Data Filter",BorderBox(6)] << Sib Append(Spacer Box(Size(0, 20)));
Window("")["Data Filter",BorderBox(7)] << Sib Prepend(
V List Box(
Text Box("Selection of Species", << Set Font Size(12), << Set Font Style("Bold Italic")),
Text Box("Please select which Species to use for the analysis. Multiple Species can be selected by holding 'ctrl' down while pressing multiple Species.", << Set Wrap(400))
)
);
Window("")["Data Filter",BorderBox(7)] << Sib Append(Spacer Box(Size(0, 20)));
Window("")["Data Filter",BorderBox(8)] << Sib Prepend(
V List Box(
Text Box("Selection of Subjects", << Set Font Size(12), << Set Font Style("Bold Italic")),
Text Box("Please select which Subjects to use for the analysis. Multiple Subjects can be selected by holding 'ctrl' down while pressing multiple Subjects.", << Set Wrap(400))
)
);
Window("")["Data Filter",BorderBox(3)] << Visibility("Collapse");
Window("")["Data Filter",CheckBoxBox(1)] << Visibility("Collapse");
Window("")["Data Filter",BorderBox(1)] << Visibility("Collapse");
nw[Outline Box(1)] << Set Title("");
// To force the order of conditional filtering
// https://community.jmp.com/t5/JMP-Wish-List/Option-to-make-Conditional-Data-Filter-work-from-top-to-bottom/idi-p/746949
f << (Filter Column(:subject) << Clear Selection);
f << (Filter Column(:species) << Clear Selection);
f << (Filter Column(:season) << Clear Selection);
There are also some places where JMP utilizes something like this (like Sample Index) but they might also have access to some nicer implementations than us.
-Jarmo