Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- How to use JSL to select many consecutive rows in a table?

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Mar 29, 2019 1:27 AM
(4864 views)

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!

2 ACCEPTED SOLUTIONS

Accepted Solutions

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Try:

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

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

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

@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

Uday

5 REPLIES 5

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Try:

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

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

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

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
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

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

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

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

@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

Uday

Article Labels

There are no labels assigned to this post.