cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
lwx228
Level VIII

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

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
txnelson
Super User

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

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

View solution in original post

hardner
Level V

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

This ability may be newer than this thread but since I was just searching out the syntax for this (and sometimes the community seems the easy place to search) I thought I'd note here that there is a function GetDataTableList() to directly get a list of open table names.

View solution in original post

4 REPLIES 4
txnelson
Super User

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

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
lwx228
Level VIII

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

Thank Jim!

VBA:ActiveWindow.ActivateNext
hardner
Level V

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

This ability may be newer than this thread but since I was just searching out the syntax for this (and sometimes the community seems the easy place to search) I thought I'd note here that there is a function GetDataTableList() to directly get a list of open table names.

lwx228
Level VIII

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.