cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
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!