There's a bug in my code if you have duplicates in the Stage column. A side effect of putting a list into a listbox is that it will only display unique values.
This code will fix that:
Get_unique_values = Function( {in_list}, {Default Local},
tmp = [=> 0];
Insert Into( tmp, in_list );
tmp << get keys;
);
dt_data = Current Data Table();
mon_list = get_unique_values( dt_data:Stage << get values );
New Window( "Select ONE Monthly ", <<Modal,
V List Box(
Text Box( "ALL for Baseline" ),
mon = List Box( mon_list ),
Button Box( "Select All",
For( i = 1, i <= N Items( mon_list ), i++,
mon << set selected( i )
)
),
Button Box( "OK", cho = mon << get selected ),
),
);
dt_data << Select Where( Contains( cho, :Stage ) );