Subscript reference wrong display boxIn the script below, I was expecting the returned title to be "Fitted Weibull Distribution" but I get "Fitted Normal Distribution" instead. I'm not sure what's wrong, really appreciate the help.
names default to here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
db = dt << Distribution(
Stack( 1 ),
Continuous Distribution(
Column( :height ),
Horizontal Layout( 1 ),
Vertical( 0 )
)
);
db << fit all;
Title_1 = report(db)[Outlinebox("Fitted?")] << get title;
print(Title_1);
<SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture1.PNG" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="Capture1.PNG" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="Capture1.PNG" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="Capture1.PNG" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="Capture1.PNG" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="Capture1.PNG" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="Capture1.PNG" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="Capture1.PNG" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="Capture1.PNG" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="Capture1.PNG" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="Capture1.PNG" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="Capture1.PNG" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="Capture1.PNG" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="Capture1.PNG" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="Capture1.PNG" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="Capture1.PNG" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="Capture1.PNG" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="Capture1.PNG" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="Capture1.PNG" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="Capture1.PNG" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="Capture1.PNG" style="width: 999px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="Capture1.PNG" style="width: 999px;"><span class="lia-inline-image-display-wrapper" image-alt="Capture1.PNG" style="width: 999px;"><img src="https://us.v-cdn.net/6038925/uploads/images/62909i5A315F267940B1CB/Capture1.PNG" role="button" title="Capture1.PNG" alt="Capture1.PNG" /></span></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN>Automation and ScriptingRe: Subscript reference wrong display boxMy guess is that JMP creates in memory all of the Fitted outputs so when you ask for
Title_1 = report(db)[Outlinebox("Fitted?")] << get title;
The Fitted Normal is the first one in Memory, and therefore it is the one returned. You can bypass this issue with
Title_1 = report(db)[Outlinebox("Fitted Weibull?")] << get title;
Or
Title_1 = report(db)[Outlinebox( 6 )] << get title;
Re: Subscript reference wrong display boxI think all the different fits are still there even if they aren't visible (they are under If Boxes), report subscripting will still match those and finally using ? wildcard search will match the first outline box which satisfies your search (in this case Fit Normal Distribution)

You can use JMP to build the path from Show Properties menu (box path)
Report(platform)["height","Fitted Weibull Distribution"]
You could write longer search term (I would avoid ? whenever possible)
Title_1 = report(db)[Outlinebox("Fitted W?")] << get title;
Or use XPath and get all the titles and get what you want from that
fit_obs = Report(db) << XPath("//OutlineBox[contains(text(), 'Fitted ')]");
fit_obs << get title;
Re: Subscript reference wrong display boxYou seem to be missing some whitespace from your outline search inside the for loop (there should be space after "Fitted" -> "Fitted ").
Regarding the indices: most likely it is getting them in "original" order

Below is an example which tries to avoid that checkbox mess using XPath
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
db = dt << Distribution(Stack(1), Continuous Distribution(Column(:height), Horizontal Layout(1), Vertical(0)));
db << fit all;
rpt = db << Report;
rpt["Compare Distributions"][CheckBoxBox(1)] << set(3, 1); //make additional random selection
Wait(0);
tb = rpt[Outline Box("Compare Distributions"), Table Box(1)];
items = tb[1] << XPath("//CheckBoxBoxItem");
selections = {};
For Each({item, idx}, items,
If(Contains(item, "\[isChecked="true"]\"),
Insert Into(selections, idx);
);
);
dists = (tb[2] << Get)[selections];
For Each({distname}, dists,
ob = rpt[Outline Box("Fitted " || distname || " ?")];
show(ob << get title);
);
Re: Subscript reference wrong display boxAh you are right. I didn't knw this before that all the possible fits are stored in the background. Good to know!
Re: Subscript reference wrong display boxI used << Get XML on the Table Box reference to see if there was anything interesting I could use to get what I wanted to
