cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
Choose Language Hide Translation Bar
View Original Published Thread

Select column group from a list

SpannerHead
Level V

Using an associative array, I have a list containing the titles of column groups (common).  I tried to use select column group with that but it doesn't work as is.  What modifications do I need to make for this to work?

 

dt << select column group( common );

 


Slán



SpannerHead
2 ACCEPTED SOLUTIONS

Accepted Solutions
SpannerHead
Level V


Re: Select column group from a list

Ignore me!  Figured it out.  Duh!

 

For( g = 1, g <= N Items( common ), g++,
    dt << select column group( common[g] )
);

Slán



SpannerHead

View solution in original post

jthi
Super User


Re: Select column group from a list

You can also use list with select column group but you have to evaluate it

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Cities.jmp");
dt << group columns("xy", {:X, :y});
dt << group columns("pollutants", :Ozone :: :Lead);

groupnames = {"xy", "pollutants"};
Eval(EvalExpr(dt << select column group(Expr(groupnames))));
-Jarmo

View solution in original post

2 REPLIES 2
SpannerHead
Level V


Re: Select column group from a list

Ignore me!  Figured it out.  Duh!

 

For( g = 1, g <= N Items( common ), g++,
    dt << select column group( common[g] )
);

Slán



SpannerHead
jthi
Super User


Re: Select column group from a list

You can also use list with select column group but you have to evaluate it

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Cities.jmp");
dt << group columns("xy", {:X, :y});
dt << group columns("pollutants", :Ozone :: :Lead);

groupnames = {"xy", "pollutants"};
Eval(EvalExpr(dt << select column group(Expr(groupnames))));
-Jarmo