Here are a couple of examples on how I would proceed
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
loop = 5;
target = "NPN1";
dtFinal = New Table( "Results", New Column( target ) );
// Generate some random selected rows
For( i = 1, i <= loop, i++,
Current Data Table( dt );
For Each Row(
If( Random Uniform( 1, 100 ) > 95,
Row State( Row() ) = Selected State( 1 )
)
);
theRows = dt << get selected rows;
dtInt = New Table( "temp", invisible, New Column( target, set values( theRows ) ) );
dtFinal = dtFinal << concatenate( dtInt, append to first table( 1 ) );
Close( dtInt, nosave );
);
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
loop = 5;
target = "NPN1";
theRows = [];
For( i = 1, i <= loop, i++,
Current Data Table( dt );
For Each Row(
If( Random Uniform( 1, 100 ) > 95,
Row State( Row() ) = Selected State( 1 )
)
);
theRows = theRows |/ (dt << get selected rows);
);
dtFinal = New Table( "Results", New Column( target, set values( theRows ) ) );
Jim