Choose Language Hide Translation Bar
Highlighted
lwx228
Level VII

How to use JSL to select many consecutive rows in a table?

How to use JSL to select many consecutive rows in a table?
The table is already in the second column of the selection, how to use JSL to cancel all the selection, and then select the number of rows specified by the number of consecutive rows, select all the columns.
Take dt = Open( "$SAMPLE_DATA/Big Class.jmp" ) for example.
The expression for a row of consecutive choices was not found in the help.

Thanks!

 

2019-03-29_16-17-35.png

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
ian_jmp
Staff

Re: How to use JSL to select many consecutive rows in a table?

Try:

dt << select Rows(6::13);

'Help > Books > Scripting Guide' coupled with 'Help > Scripting Index' are good resources.

View solution in original post

Highlighted
uday_guntupalli
Level VIII

Re: How to use JSL to select many consecutive rows in a table?

@lwx228 , 

Try this ? 

dt = Open("$SAMPLE_DATA/Big Class.jmp");

// Clear Row Selection 
dt << Select Randomly(0.1); 

dt << Clear Select(); 

// Clear Column Selection 

dt << Select columns({:age,:sex}); 

dt << Clear Column Selection();

 

Best
Uday

View solution in original post

5 REPLIES 5
Highlighted
lwx228
Level VII

Re: How to use JSL to select many consecutive rows in a table?

dt = Current Data Table();
dt << Go To( Column( 2 ) );
dt << Clear Column Selection();
Wait( 0 );
dt << Set Selected Rows( dt[6 :: 13] );
Wait( 0 );

 This JSL cannot be implemented

Highlighted
ian_jmp
Staff

Re: How to use JSL to select many consecutive rows in a table?

Try:

dt << select Rows(6::13);

'Help > Books > Scripting Guide' coupled with 'Help > Scripting Index' are good resources.

View solution in original post

Highlighted
lwx228
Level VII

Re: How to use JSL to select many consecutive rows in a table?

thank ian_jmp!

After selecting rows, how does JSL implement deselect all selections?Make table without any cell selection, thank!

Highlighted
lwx228
Level VII

Re: How to use JSL to select many consecutive rows in a table?

"dt << Clear Select()" Sometimes it doesn't work.

Highlighted
uday_guntupalli
Level VIII

Re: How to use JSL to select many consecutive rows in a table?

@lwx228 , 

Try this ? 

dt = Open("$SAMPLE_DATA/Big Class.jmp");

// Clear Row Selection 
dt << Select Randomly(0.1); 

dt << Clear Select(); 

// Clear Column Selection 

dt << Select columns({:age,:sex}); 

dt << Clear Column Selection();

 

Best
Uday

View solution in original post

Article Labels

    There are no labels assigned to this post.