Subscribe Bookmark RSS Feed

How Do I get the number of Data Tables

jay_S

Occasional Contributor

Joined:

Jun 1, 2017

Hello,

so i have a script that gets a data table with data and a data table with its specs. when i manually run Process Capability i can choose the columns and use the spec table and everything works like intended.

the Problem:

I am trying to run this through a JSL script. the idea is to get a list of the currently open data tables, open a new window, have a dropdown with the list of data tables, and the user can choose the spec table they want to use. this script would run on the toolbar and the user will run it off the data table with the data they are interested.

I can use insertInto(dt,data table(i++)) to get a list of the data tables but breaks once i exceeds the number of tables. is thier a function like N Items(data tables)?? or do i have to get the user to type in the table name?

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson

Super User

Joined:

Jun 22, 2012

Solution

I think this piece of code should help you out

datatables = {};
For( i = 1, i <= N Table(), i++,
	Insert Into( datatables, Data Table( i ) << get name )
);
Jim
1 REPLY
txnelson

Super User

Joined:

Jun 22, 2012

Solution

I think this piece of code should help you out

datatables = {};
For( i = 1, i <= N Table(), i++,
	Insert Into( datatables, Data Table( i ) << get name )
);
Jim