cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Register to attend Discovery Summit 2025 Online: Early Users Edition, Sept. 24-25.
  • New JMP features coming to desktops everywhere this September. Sign up to learn more at jmp.com/launch.
Choose Language Hide Translation Bar
terapin
Level VI

JSL instruction to call script saved with data table?

I'm trying to call a script saved with a data table from another JSL script.  Is that possible?  I've used Include() before to call a JSL file, but can't figure out how to call a script that is saved with a data table.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: JSL instruction to call script saved with data table?

Yes, this is possible--for example:

eval(dt << get table property("Distribution"));

The above line runs a script called Distribution that has been saved to the data table referenced by dt.

Cheers,

Brady

View solution in original post

5 REPLIES 5

Re: JSL instruction to call script saved with data table?

Yes, this is possible--for example:

eval(dt << get table property("Distribution"));

The above line runs a script called Distribution that has been saved to the data table referenced by dt.

Cheers,

Brady

terapin
Level VI

Re: JSL instruction to call script saved with data table?

Fabulous,

Thought there would be some way to do it.  Thanks for letting me know.

uday_guntupalli
Level VIII

Re: JSL instruction to call script saved with data table?

Is there a way to get a reference and then extract the values from the analysis platform ? 

@Craige_Hales @brady_brady @pmroz ? 

Best
Uday
ian_jmp
Level X

Re: JSL instruction to call script saved with data table?

NamesDefaultToHere(1);
dt = Open("$SAMPLE_DATA/Big Class.JMP");
// Find out what scripts are stored
sl = dt << getTableScriptNames;
// Pick a script at random
s = sl[RandomInteger(1, NItems(sl))];
// Run it
s = dt << runScript(s);
// Get a reference to the analysis object
obj = Report(s) << getScriptableObject;
// Find out what messages this object understands
ShowProperties(obj);
Eric_Hill
Staff

Re: JSL instruction to call script saved with data table?

Hey,

There is a simpler way to do this that may have been added after @brady_brady posted his solution. You can just do:

dt << Run Script("Distribution");

Eric

Recommended Articles