Hello, I am trying to write a script to join tables in JSL, where we can input the number of tables to join. For this, I created lists to input html table location, tables names and joiner columns.
Before the join, I start by opening the tables, taking an element from the lists in a for loop.
I get an error message "Subscript problem in access or evaluation of "tables_list[i]", tables_list[/*###*/].
Any idea what I did wrong? Thank you in advance for the support
// Indicate how many input data tables you have (default = 1)
nb_join_tables = 2;
// Indicate here the link to the first input HTML table
input_table_01 = "http://xxxx.html";
// Indicate here the names you want for your first JMP data tables
JMP_table_01_name = "xxx -01";
// Indicate here the link to the input HTML table to join
input_table_02 = "http://xxxx.html";
input_table_03 = "http://xxxx.html";
// Indicate here the names you want for the data tables to join
JMP_table_02_name = "xxx -02";
JMP_table_03_name = "xxx -03";
// indicate here the column you want JMP to use as joiner for the tables merge (default:Parameter Set Name)
joiner_table_01 = "Parameter Set Name";
joiner_table_02 = "Parameter Set Name";
joiner_table_03 = "Parameter Set Name";
// Create lists according to the number of tables to merge
tables_list = {input_table_01,input_table_02,input_table_03};
names_list= {JMP_table_01_name,JMP_table_02_name,JMP_table_03_name};
joiners_list = {joiner_table_01,joiner_table_02,joiner_table_03};
For( i = 0, i <= nb_join_tables, i++,
//Open html data table from specific location
dt=Open(
tables_list[i],
HTML Table( 4, Column Names( 0 ), Data Starts( 1 ) )
);
// Set JMP data table name to the desired one
dt << Set Name( names_list[i] );
);