Choose Language Hide Translation Bar
Highlighted

JMP scripting

I would like to script the conversion of results from a formula in a column to static numbers. Is that possible?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
ian_jmp
Staff

Re: JMP scripting

If I understand correctly, you just have to delete the formula that generated the values (via the 'Column Info' dialog).

In JSL:

NamesDefaultToHere(1);

dt = NewTable("Test Remove Formula",

NewColumn("Values From Formula",Numeric, Continuous, Formula(RandomNormal())),

AddRows(10)

);

Wait(3);

Column(dt, "Values From Formula") << deleteFormula;

View solution in original post

5 REPLIES 5
Highlighted
ian_jmp
Staff

Re: JMP scripting

If I understand correctly, you just have to delete the formula that generated the values (via the 'Column Info' dialog).

In JSL:

NamesDefaultToHere(1);

dt = NewTable("Test Remove Formula",

NewColumn("Values From Formula",Numeric, Continuous, Formula(RandomNormal())),

AddRows(10)

);

Wait(3);

Column(dt, "Values From Formula") << deleteFormula;

View solution in original post

Highlighted

Re: JMP scripting

Thanks for pointing me in the right direction. I simplified your approach to

:Values From Formula << deleteFormula;


which worked like a charm.


As usual, the correct answer will come when the question is phrased correctly.

Highlighted
txnelson
Super User

Re: JMP scripting

Your simplification should work great as long as JMP properly points to the correct data table.  I suggest that you scope the variable to ensure that there is no question as to what data table you are working with.

dt:Values From Formula << deleteFormula;

It is a good coding practice to remove the ambiguities.

Jim
Highlighted

Re: JMP scripting

Point taken. In this case is the house brand version of a script. It will never be shared or used by the outside world.

Highlighted
lwx228
Level VII

Re: JMP scripting

Simple removal formula problem, I always find the master code to solve.thank you
Article Labels

    There are no labels assigned to this post.