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. EST 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
mlo1
Level IV

Access jsl code of New Column with Formula

Hello,

 

is there a simple way of getting the jsl code of a generated column (I used New Formula Column from column menu) as I am wondering how to deal with the local variables in the New Column jsl code (Formula).

Best regards

 

2019-02-26 10_06_23-Year Week[Timestamp] - JMP.png

1 ACCEPTED SOLUTION

Accepted Solutions
ian_jmp
Level X

Re: Access jsl code of New Column with Formula

NamesDefaultToHere(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

// Add a formula column . . .
nc = dt << NewColumn("BMI", Numeric, Continuous, Formula((:weight/:height^2)*703));

// Get the formula expression from a column into a variable . . .
bmiFormula = nc << getFormula;
Print(bmiFormula);

View solution in original post

2 REPLIES 2
ian_jmp
Level X

Re: Access jsl code of New Column with Formula

NamesDefaultToHere(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

// Add a formula column . . .
nc = dt << NewColumn("BMI", Numeric, Continuous, Formula((:weight/:height^2)*703));

// Get the formula expression from a column into a variable . . .
bmiFormula = nc << getFormula;
Print(bmiFormula);
mlo1
Level IV

Re: Access jsl code of New Column with Formula

Thank you very much - works perfect

Recommended Articles