Hi all, how can i make it such that whenever i click a button i placed in a journal it will run the script that is located in another folder.
Using a test script below i am able to successfully open script in another folder. This is on JMP16.
Names Default To Here( 1 );
Clear Log();
Dir = Get Default Directory();
file_name = "JMP script/Load_PD.jsl";
file_path = Char(Dir || file_name);
Open(file_path);
Using the test scrip i made i tried to implement it to my main script as shown below.
The script shown below is just a snippet.
LoadTableType = Function( {reportType},
Dir = Get Default Directory();
If(
reportType == "PD",
file_name = "JMP script/Load_PD.jsl";
file_path = Char(Dir || file_name);
show(file_path);
Current Journal() << Append( Button Box("Load PD Table", Open (file_path))),
);
);
However after the main code finishes running and the button is generated, each time i click the button i keep getting this error shown below:
Name Unresolved: file_path in access or evaluation of 'file_path' , file_path/*###*/
Would greatly appreciate any advice given thank you!