cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Andyon98
Level II

How do I make a list of strings containing the titles of opened data tables from a button using the open function?

Exactly as the title suggests, im trying to make a list of strings containing the titles of the files I am using from using the open(); function.
1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: How do I make a list of strings containing the titles of opened data tables from a button using the open function?

Depends on the application.

You could initialize list and then add new table names to it with Insert Into() when needed (use << get name to datatable reference if needed).

Names Default To Here(1);
dt_name_list = {};
show(dt_name_list);
dt1 = Open("$SAMPLE_DATA/Big Class.jmp");
Insert Into(dt_name_list, dt1 << get name);
show(dt_name_list);
dt2 = Open("$SAMPLE_DATA/Cars.jmp");
Insert Into(dt_name_list, dt1 << get name);
show(dt_name_list);

Or you could get all open table names and then remove unnecessary ones from that list

Names Default To Here(1);
Open("$SAMPLE_DATA/Big Class.jmp");
Open("$SAMPLE_DATA/Cars.jmp");
dt_name_list = Get Data Table List() << get name;
-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: How do I make a list of strings containing the titles of opened data tables from a button using the open function?

Depends on the application.

You could initialize list and then add new table names to it with Insert Into() when needed (use << get name to datatable reference if needed).

Names Default To Here(1);
dt_name_list = {};
show(dt_name_list);
dt1 = Open("$SAMPLE_DATA/Big Class.jmp");
Insert Into(dt_name_list, dt1 << get name);
show(dt_name_list);
dt2 = Open("$SAMPLE_DATA/Cars.jmp");
Insert Into(dt_name_list, dt1 << get name);
show(dt_name_list);

Or you could get all open table names and then remove unnecessary ones from that list

Names Default To Here(1);
Open("$SAMPLE_DATA/Big Class.jmp");
Open("$SAMPLE_DATA/Cars.jmp");
dt_name_list = Get Data Table List() << get name;
-Jarmo
Andyon98
Level II

Re: How do I make a list of strings containing the titles of opened data tables from a button using the open function?

This looks good! I can work with this, thank you!

Recommended Articles