I am trying to
1) Open a series of files that are listed in the list Unique_Files
2) If the file doesn't exist, then a dialog box opens up with a message indicating the file exists
3) If the file does exist, then open the file in JMP
4) If the file does exist, then add the data table reference name to the list UniqueTables
Every other part of my script seems to be working except being able to create a list of the data table reference name. The way my script is written below results in the list
UniqueTables = { DataTable("filename1"), Data Table("filename2"),....}
Instead I want the script to result in the list as
UniqueTables = My_Table_1, My_Table_2, My_Table_3,...
Thanks in advance.
N Items (Unique_Files);
UniqueTables = { };
For ( i = 1, i <= N, i ++,
If(
File Exists( "C:\PretendFilePath\" ||Unique_Files[i]|| ".csv"),
Eval(
Substitute(
Expr(
MyTab = Open( "C:\PretendFilePath\" ||Unique_Files[i]|| ".csv");
Insert Into( UniqueTables, MyTab)
),
Expr( MyTab),
Parse( My_Table_" ||Char(i))
)
),
New Window ("File Not Found",
<< Modal,
V List Box(
Text Box( Unique_Files[i]|| " does not exist in folder."),
Button Box( "OK")
)
)
)
);