I want to create a generic script to create a data table.
In the first part of the Script I have a list to select columns for creation of data table:
nw = New Window("Create data table",
<<Type("Modal Dialog"),
<<Return Result,
V List Box(
Spacer Box(size(0, 15)),
Text Box(
"Please select the limits to display in data table (multiple selection posssible): "
),
Spacer Box(size(0, 5)),
clb_limit = Col List Box(all, <<Set Data Type("numeric"), width(250)),
Spacer Box(size(0, 15)),
H List Box(Button Box("OK"), Button Box("Cancel"))
),
);
//Extract variables from entry form and put them into separate
list names_limit = nw["clb_limit"];
Show(names_limit);
In the second part the I need a script which creates a data table depending on selected columns (numbers of columns and names of column are different). Below two examples for normal script (not generic):
Example1:
dt_data = Current Data Table();
dt_LimitCalc = dt_data << Summary(
Group(:GROUP, :CHART, :EVALUATION, :NAME),
N(:VALUE),
Mean(:VALUE),
Std Dev(:VALUE),
Mean(:Limit1),
Mean(:Limit2),
Freq("None"),
Weight("None")
);
Example 2:
dt_data = Current Data Table();
dt_LimitCalc = dt_data << Summary(
Group(:GROUP, :CHART, :EVALUATION, :NAME),
N(:VALUE),
Mean(:VALUE),
Std Dev(:VALUE),
Mean(:xy_Limit),
Mean(:Limi_xy),
Mean(:Lim_123),
Freq("None"),
Weight("None")
);

Can somebody helps to create a generic script depending on selected columns? Only the bold part changes. All other parts are the same.
Edit (jthi): Added JSL formatting and image of bolded parts