The answer is probably no, but I thought I'd ask anyways
Question: is there any way to make For Each Row() go in reverse (from bottom to top)? Like --
It works slick and fast, but of course it's working top to bottom. I need to delete some rows and one always wants to do this in reverse of course.
I wouldn't use For Each Row() to delete rows. I think an even faster method would be to use DeleteRows. For example, if one wanted to delete rows where Column(1) has missing values, one could do the following:
dt = current data table();
rowsToDelete = dt << Get Rows Where( Is Missing(:Column 1) );
If( NRows( rowsToDelete ) != 0,
dt << Delete Rows( rowsToDelete );
You can supply the conditional clause you'd need within the Get Rows Where().
Hope this helps!
Philip Brown is write. his method is not only faster but more reliable.
regarding the reverse way, you can try this option:
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
For( i = N Rows( dt ), 1 >= 1, i--,
dt << select where( Row() == i );
dt << delete rows;
Wait( 1.5 );