Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

- JMP User Community
- :
- Discussions
- :
- JMP scripting

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Dec 3, 2015 4:00 AM
(8396 views)

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

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**;

5 REPLIES 5

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

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**;

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

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
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

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
##

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: JMP scripting

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

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.