Choose Language Hide Translation Bar
Highlighted
lwx228
Level VII

How do code JSL to run the text directly to the table?

See the image.Thank you very much!

2019-09-30_15-29-44.png

 

d2 = Current Data Table();
aaa = d2[1, 1];
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << New Column( "test", formula( aaa ) );
dt << run formulas;
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
txnelson
Super User

Re: How do code JSL to run the text directly to the table?

Here are 2 ways to do this........I am sure others also exist

Names Default To Here( 1 );
d2 = Data Table( "Formula Table" );
aaa = d2[1, 1];
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Eval(
	Substitute(
			Expr(
				dt << New Column( "test", formula( __formula__ ) );
				dt << run formulas;
			),
		Expr( __formula__ ), Parse( aaa )
	)
);
Names Default To Here( 1 );
d2 = Data Table( "Formula Table" );
aaa = d2[1, 1];
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Eval( Parse( "dt << New Column( \!"test\!", formula( " || aaa || " ) );" ) );
dt << run formulas;
Jim

View solution in original post

2 REPLIES 2
Highlighted
txnelson
Super User

Re: How do code JSL to run the text directly to the table?

Here are 2 ways to do this........I am sure others also exist

Names Default To Here( 1 );
d2 = Data Table( "Formula Table" );
aaa = d2[1, 1];
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Eval(
	Substitute(
			Expr(
				dt << New Column( "test", formula( __formula__ ) );
				dt << run formulas;
			),
		Expr( __formula__ ), Parse( aaa )
	)
);
Names Default To Here( 1 );
d2 = Data Table( "Formula Table" );
aaa = d2[1, 1];
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Eval( Parse( "dt << New Column( \!"test\!", formula( " || aaa || " ) );" ) );
dt << run formulas;
Jim

View solution in original post

Highlighted
lwx228
Level VII

Re: How do code JSL to run the text directly to the table?

I really appreciate Jim.You taught me a lot.Thank you very much!
Article Labels

    There are no labels assigned to this post.