cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. ET on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
robot
Level VI

Add script stored in variable to data table

How can I add a script to create a data table to another data table?  I have tried different combinations of Get ScriptNew Script, and Eval without success.  I am using JMP 18.1.2.

 

// Example
dt_1; // Starting table 1.
dt_2; // Starting table 2.

dt_2_script = dt_2 << Get Script;

// None of these work:
dt_1 << New Script( "dt_2 Script", dt_2_script );
dt_1 << New Script( "dt_2 Script", Eval( dt_2_script ) );
dt_1 << New Script( "dt_2 Script", dt_2 << Get Script );
dt_1 << New Script( "dt_2 Script", Eval( dt_2 << Get Script ) );
2 ACCEPTED SOLUTIONS

Accepted Solutions
jthi
Super User

Re: Add script stored in variable to data table

Here is one option (evaluate it with while utilizing name expr)

Names Default To Here(1);

dt1 = Open("$SAMPLE_DATA/Big Class.jmp");
dt2 = Open("$SAMPLE_DATA/Big Class Families.jmp");

dt1_script = dt1 << Get Script;


Eval(EvalExpr(
	dt2 << New Script("Create dt1", Expr(Name Expr(dt1_script)))
));
-Jarmo

View solution in original post

txnelson
Super User

Re: Add script stored in variable to data table

Try this

Eval( Eval Expr( dt_1 << new script( "dt_2 Script", Expr( dt_2_script = dt_2 << Get Script ) ) ) )
Jim

View solution in original post

2 REPLIES 2
jthi
Super User

Re: Add script stored in variable to data table

Here is one option (evaluate it with while utilizing name expr)

Names Default To Here(1);

dt1 = Open("$SAMPLE_DATA/Big Class.jmp");
dt2 = Open("$SAMPLE_DATA/Big Class Families.jmp");

dt1_script = dt1 << Get Script;


Eval(EvalExpr(
	dt2 << New Script("Create dt1", Expr(Name Expr(dt1_script)))
));
-Jarmo
txnelson
Super User

Re: Add script stored in variable to data table

Try this

Eval( Eval Expr( dt_1 << new script( "dt_2 Script", Expr( dt_2_script = dt_2 << Get Script ) ) ) )
Jim

Recommended Articles