Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
mlo1
Level III

value ordering - using JSL to set column properties

Hi

 

I need some scripting advice as there were changes in the column properties from JMP14 to JMP15 regarding the value ordering - introducing "custom order"

The following script works fine in JMP 14 and the result can be seen checking the column properties

Summarize( g = by( :BatchVO ), m = Mean( :name("Timestamp") ) );
// JMP 14 Script for value ordering column "BatchVO" in the Order of the values in column "Timestamp"
:BatchVO << Set Property( "Value Ordering", Eval( g[Rank Index( m )] ) );

mlo1_0-1599138082662.png

The script above works in JMP15 but the result is not visible in the column properties - I guess - due to the new "custom order"

Does anyone knows how to change this to get it working and the result visible in the column properties in JMP15?

The following does not work.

Summarize( g = by( :BatchVO ), m = Mean( :name("Timestamp") ) );

//JMP15 Script
:BatchVO << Set Property( "Value Order",  {Custom Order(Eval( g[Rank Index( m )] ))} );

Any ideas about the correct JSL script for JMP15 and above?

@martindemel 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
txnelson
Super User

Re: value ordering - using JSL to set column properties

The values returned from your Summarize for the "g" variable are returned as character strings, and you are attempting to apply character string values to a numeric column

The code below appears to do what you want

names default to here(1);
Summarize( g = by( :BatchVO ), m = Mean( :name("Timestamp") ) );

for(i=1,i<=nitems(g),i++,
	g[i]=num(g[i])
);

//JMP15 Script
eval(substitute(expr(:BatchVO << Set Property( "Value Order",  {Custom Order(__list__)} );),
expr(__list__), g[Rank Index( m )] ));
Jim

View solution in original post

2 REPLIES 2
Highlighted
txnelson
Super User

Re: value ordering - using JSL to set column properties

The values returned from your Summarize for the "g" variable are returned as character strings, and you are attempting to apply character string values to a numeric column

The code below appears to do what you want

names default to here(1);
Summarize( g = by( :BatchVO ), m = Mean( :name("Timestamp") ) );

for(i=1,i<=nitems(g),i++,
	g[i]=num(g[i])
);

//JMP15 Script
eval(substitute(expr(:BatchVO << Set Property( "Value Order",  {Custom Order(__list__)} );),
expr(__list__), g[Rank Index( m )] ));
Jim

View solution in original post

Highlighted
mlo1
Level III

Re: value ordering - using JSL to set column properties

Thank you very much.
Now it is visible in the column properties menu - great.