I have created a script to make a subset table of a larger table, but it isn't working correctly. My goal is to have the user select which columns they would like in the subset table, and then have the script perform a formula on the columns before it places the data into the new table. So far my script will pull up the dialogue box for the user interaction, but when I select the columns in the dialogue box, they aren't the ones that show up in the subset table. I'm not sure where my problem lays with that. (Note: the user will be selecting columns with data in them, rather than sample information, so in the example, columns with column names starting with "Column 10...".)
Additionally, I'm not sure where I would insert the formula. Basically the columns the user selects from the dialogue box will have some cells with < symbols, for the new subset table, I would like any cell without a less than symbol to turn to zero and any cell with a < symbol to have the < symbol removed placing only the number beside it in the subset table. So the new subset table with have zeros for detected values and the detection limit for the non detected compounds.
Here's my script so far.
Names Default To Here( 1 );
dt = Data Table("Example Data");
col_dlg = new window("Column Select",
panelbox("Select columns to create NonDetect table with",
col_clist = collistbox(all, width(200)),
buttonbox("Ok",
selected_column_list = col_clist << getselected;
dt2 = dt << Subset(Output Table("NonDetect"),columns(col_clist));
col_dlg << close window;
)
)
);Thank you for any help!