cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar

Make using formula expressions in Set Each Value and using expressions as first argument in Col statistical formulas supported behaviour

What inspired this wish list request? After contacting JMP support regarding Bug when using combination of set each value, tables with same column name(s) and col statistical fu... (00049239) I got to know that the way I have been using << Set Each Value and Col statistical functions (such as Col Rank() and Col Sum()) successfully for many years are unintended. The inspiration here is that the way they currently work make scripting in JMP much much faster and easier when creating new columns and if the behaviours were to change, I would have to rewrite all my scripts (most likely I will just start using something like Python at that point for all my data manipulation scripting needs).

 

What is the improvement you would like to see? Change the behaviour where user can use << Set Each Value with formula expression as  supported behaviour. Change the behaviour where expressions can be used as first argument (or any argument?) in Col statistical functions  as supported behaviour. Or at least provide confirmation that the behaviour won't be changing.

 

Why is this idea important? There are hundreds or thousands of examples in JMP community where these functions/messages are being used wrong. I use them wrong in almost all of my scripts as those behaviours are so powerful and much faster than any other options I know of in JMP. If these are to change without any notice (or even with notice) I will have to stay with some older version of JMP which still support these behaviours or start using other means for my data manipulation tasks.

 

Some examples from community: First Value for a Unique ID , How to calculate relativ values based on a position of a base value? , Special Formula Columns , Searching Maximum value of each row across several column and name of source column , Fill column with values based on another column with keys and associative array , JSL Companion 2nd Edition Applications of the JMP Scripting Language, Second Edition contains examples of using << Set Each value (for example 3_CreateDeleteColumns.jsl)

3 Comments
hogi
Level XI

@jthi wrote:

use << Set Each Value with formula expression as  supported behaviour


... if it wasn't available already in Jmp - it would be a huge improvement if it was added

 

Very useful that set each value() can be used exactly like formula(...).


alternative if the functionality of set each value() gets restricted: 
use formula() instead of set each value() -  and after the first cycle of calculations: disable it or remove it.
an additional option "just calculate once", like suggested in this wish, could facilitate it:
New Formula Column - new option: just calculate 

jthi
Super User

Since making this wish list item at some point I came across this in Scripting Guide. It could be that expression is to be considered constant in JMP (but who knows).

Scripting Guide https://www.jmp.com/support/help/en/17.2/index.shtml#page/jmp/evaluate-formulas-in-data-tables.shtml

jthi_0-1700377066626.png

 

JSL Syntax Reference

https://www.jmp.com/support/help/en/17.2/#page/jmp/column-messages.shtml?os=win&source=application#w...

jthi_1-1700377078470.png

 

Scripting Index

jthi_2-1700377156866.png

 

hogi
Level XI

The entry in the Scripting Guide makes it really hard for Jmp support to argue that Expressions are not supported in Set Each Value 

 

For Jmp18 there is nothing to fear - same statement as before:

https://www.jmp.com/support/help/en/18.0/#page/jmp/evaluate-formulas-in-data-tables.shtml# 

 

... Seems that the entry in the Scripting Index has to get updated.

It's not the only place where the Scripting Guide doesn't show the full potential of the JSL function:

 

 

  • hogi_5-1700385380040.png

    (just kidding)