cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.
  • JMP will suspend normal business operations for our Rest and Recharge Day on Friday, October 2, 2026.
    Regular business hours will resume on Monday, October 5, 2026.

Discussions

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

evaluating a string using a column formula?

I have a column with strings, e.g.  20.5 + 1.18*1.61 - 0.0816*(1.61-1.85)^2 , and I would like to evaluate its value in a different column. I tried using eval() with the name of the column with the strings as argument, but it did not work: I simply get the string again, not the value of that string.

 

I am sure the strings can be evaluated, because I tried eval(20.5 + 1.18*1.61 - 0.0816*(1.61-1.85)^2 ) and it gave me a number as expected.

 

Is it possible to use a function to evaluate a column, and if so how? I am not looking for a JSL solution.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: evaluating a string using a column formula?

Eval() works on your expression in a script editor because it's not a string there. In the column, it's a string. First you need to parse the string (which converts a string into a JSL expression), and then eval it. Try this for your column formula (Column 1 is the one with your strings):

 

Eval( Parse( :Column 1 ) )

View solution in original post

3 REPLIES 3

Re: evaluating a string using a column formula?

Eval() works on your expression in a script editor because it's not a string there. In the column, it's a string. First you need to parse the string (which converts a string into a JSL expression), and then eval it. Try this for your column formula (Column 1 is the one with your strings):

 

Eval( Parse( :Column 1 ) )
jvillaumie
Level III

Re: evaluating a string using a column formula?

That worked; thanks for the quick reply

derekc
Level I

Re: evaluating a string using a column formula?

First time I've used this after almost 20 years of using JMP! If only I'd been aware of this before!

Recommended Articles