Choose Language Hide Translation Bar
Highlighted
jay_S
Level II

How Do I get the number of Data Tables

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

Re: How Do I get the number of Data Tables

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

View solution in original post

1 REPLY 1
Highlighted
txnelson
Super User

Re: How Do I get the number of Data Tables

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

View solution in original post

Article Labels

    There are no labels assigned to this post.