cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • DownloadSemiconductor Toolkit: Tools to create wafer maps, add wafer geometry to graphics, explore die defects & compare wafers.
  • Discovery Summit 2026: Early User Edition - September 23-24.Register. It's free.
  • Use JMP Clinical with CDISC-compliant data. Review studies, ID safety and efficacy signals & communicate findings with interactive graphics. Register to see how. Aug. 27, 2 pm US ET.

JMP Knowledge Base

Choose Language Hide Translation Bar
How to use a variable value in a formula

If you use a global variable in your column formula, the formula might function normally in your current session of JMP®, but when re-opening the application, the global variable will be nonexistent thus the formula will not evaluate properly.

Instead of using the variable directly in the formula, you should substitute the variable value in its place. The function, Eval Expr() can be used for this purpose.

Here is example code that uses the function to perform the task:

dt = Open( "$SAMPLE_DATA/big class.jmp" ); 
myConstant = 25;
Eval( Eval Expr( dt << New Column( "Weight Plus", numeric, continuous, Formula( :weight + Expr( myConstant ) ) ) ) );

 

[Previously JMP Note 41824]

Details
Operating System
macOS Windows
Products JMP JMP Pro

Recommended Articles