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 get multiple open data table file names for JSL?

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

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

Oct 27, 2018 3:56 AM
(2036 views)

Hi:

Assuming that two datatable files have been opened but no table Numbers have been entered in advance, how do can get multiple datatable file names that have been opened?How to jump from the current file to another file?Thank you!

2 ACCEPTED SOLUTIONS

Accepted Solutions

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

You can find out the number of open tables with the N Table() function, and then get each name by looping through the open tables and asking for each table's name

```
Names Default To Here( 1 );
For( i = 1, i <= N Table(), i++,
Show( Data Table( i ) << get name )
);
```

Below is one example of how I deal with the need to point directly at a data table, which allows one to switch between them.

```
Names Default To Here( 1 );
dtLIst = {};
For( i = 1, i <= N Table(), i++,
dt = data table(i);
insert into(dtList, dt );
);
eval(dtList[1]) << new column("added column", set each value(5));
dtList[2] << bivariate();
```

Jim

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

*is* a function GetDataTableList() to directly get a list of open table names.

4 REPLIES 4

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

You can find out the number of open tables with the N Table() function, and then get each name by looping through the open tables and asking for each table's name

```
Names Default To Here( 1 );
For( i = 1, i <= N Table(), i++,
Show( Data Table( i ) << get name )
);
```

Below is one example of how I deal with the need to point directly at a data table, which allows one to switch between them.

```
Names Default To Here( 1 );
dtLIst = {};
For( i = 1, i <= N Table(), i++,
dt = data table(i);
insert into(dtList, dt );
);
eval(dtList[1]) << new column("added column", set each value(5));
dtList[2] << bivariate();
```

Jim

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

Re: How to get multiple open data table file names for JSL?

Thank Jim!

VBA：ActiveWindow.ActivateNext

VBA：ActiveWindow.ActivateNext

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

*is* a function GetDataTableList() to directly get a list of open table names.

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

Re: How to get multiple open data table file names for JSL?

GetDataTableList() does not work if the table is already open.

So I'm going to use the Jim's method.