I have a window to prompt the user to filter based on model numbers they'd like to choose, the problem is that I think this window is getting overwritten and causing an error when it runs all of the way through, so I'd like it to first stop, display the window, and wait for the user to input their choices. Here's the window script:
//*** Create a window to prompt user to filter for Model numbers they would like to use
prods = Associative Array( Column( dt2, "Product CFN" ) << getValues ) << getKeys;
nw1 = New Window( "2014 Product Filter", lb1 = List Box( prods ), Button Box( "OK", OKscript2014 ) );
OKscript2014 = Expr(
SelectedProds = lb1 << getSelected;
selectedRows = [];
For( p = 1, p <= N Items( SelectedProds ), p++,
selectedRows = V Concat( selectedRows, dt2 << getRowsWhere( :Product CFN == SelectedProds[p] ) )
);
dt5 = dt2 << Subset( Rows( selectedRows ), LinkToOriginalDataTable( 0 ) );
Wait( 0 );
dt5 << Save( dir || "\PrimaryRFR_ProductFiltered_2014.jmp" );
);