Please, share your code as text using JSL code block not as images.
Still not sure what is going wrong (might be because I'm only seeing parts of code). Have you verified that rpt variable has what you think it has? Where are you getting the count for Table Boxes? Which JMP version are you using? Are you using LLM to assist in you JSL?
But here are two examples of what I think you are trying to do
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
Column(dt, "age") << Set Data Type("Character");
ow = dt << Oneway(
Y(:height),
X(:age),
ANOM(1, Show Summary Report(1), Point Options("Show Needles")),
By(:sex)
);
dt_res = Report(ow[1])[Outline Box("Analysis of Means Summary"), Table Box(1)] << Make Combined Data Table;
// Or by looping
dt_res2 = Empty();
For Each({cur_ow}, ow,
cur_group = Word(-1, Report(cur_ow) << Get Title, "=");
dt_group = Report(cur_ow)[Outline Box("Analysis of Means Summary"), Table Box(1)] << Make Into Data Table;
dt_group << New Column("Column", Character, Nominal, Set Each Value(cur_group));
If(Is Empty(dt_res2),
dt_res2 = dt_group;
,
dt_res2 << Concatenate(
dt_group,
"Append to first table"
);
Close(dt_group, no save);
);
);
-Jarmo