I'm creating a summary from a parent table. Columns in the parent table are grouped and I want to maintain the grouping in the summary table? I have renamed columns in the summary to match the parent if that helps?
Have you taken a look at scripting index (<< Get Column Group Names, <

Jarmo
Did look there, couldn't make head nor tail. Resorted to robbing part of an old script. dt references the parent table and dtbest references the summary table. Seems to work.
Grps = dt << Get Column Groups Names;
For( j = 1, j <= N Items( Grps ), j++,
colrefs={};
colrefs = dt << get column group(Grps[j]);
Group = dtBest << Group Columns(colrefs);
dtBest << rename column group( Group, Grps[j] );
);
For Each({groupname}, dt << Get Column Groups Names,
cols = dt << Get Column Group(groupname);
dt_new << Group Columns(groupname, cols);
);
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Cities.jmp");
dt << group columns("xy", {:X, :y}); // for demo purposes
dt << group columns("pollutants", :Ozone :: :Lead); // for demo purposes
dt_summary = dt << Summary(
Group(:X, :Y, :OZONE, :CO, :SO2, :NO, :PM10, :Lead, :city),
Freq("None"),
Weight("None"),
Link to original data table(0),
output table name(
"Summary of Cities grouped by X, Y, OZONE, CO, SO2, NO, PM10, Lead, city"
)
);
dt_summary << Ungroup Columns(); // for demo purposes, they are grouped by default
For Each({groupname}, dt << Get Column Groups Names,
cols = dt << Get Column Group(groupname);
dt_summary << Group Columns(groupname, cols);
);