Hello,
Looking for tips on how to make my script more dynamic.
Given the snippet below we have a data table << Get as Report that we add onto a Col Box() with dynamic buttons.
Now, here lies the issue. I need to put X amount of data tables into my window and I'm not sure how to go about it since I also need to add dynamic buttons to each table.
The exact amount of data tables can vary.
Thanks for the help
data_window = New Window("Down Time Exceeding 5mins",
<< Size Window( 1000, 600 ),
H List Box(
OutLine Box ("foo",
dt_Rpt = dt_dt << Get as Report();
)
)
);
tb = dt_Rpt[Table Box( 1 )];
tb << append(
bb = col box("Pull Alarms")
);
bblist = {};
for (i = 1, i<=N Rows(dt_dt), i++,
bb_expr = evalinsert("\[bblist[i] = buttonbox("Pull Alarms",
tb << Set Selected Rows(Matrix({^i^}));
dt = Get Data Table( "foo Alarms for rows " || char(^i^));
dt << ShowWindow( 1 );
dt << Bring Window To Front;
)]\");
eval(parse(bb_expr));
bb << append(bblist[i]);
);