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

JSL command to call "Value Order" window

Dear,

I'm writing a JSL script but I would like to call "Value Order" window so that I can sort the data by that window.

In the Scripting Index I found "axisbox << Edit Value Order();" and "Value Order" appears. But after I apply to my script it does not appear the "Value Order" window.

Syntex: obj << Edit Value Order
My script I refer obj as a Table:ColumnName? Is it do-able?

Thank you for your help.

4 REPLIES 4
SDF1
Super User

Re: JSL command to call "Value Order" window

Hi @AvgLizard122 ,

 

  Do you have to have the interactive window to set the value ordering? If you know what the value ordering should be, you can always set it with JSL, like:

:ColumnName<<Set Property("Value Ordering", {"item1", "item2", "item3"});

  With the example in the Scripting Index, it appears that you have to first generate an analysis (e.g. the Oneway() ), then send it to a report, then call the axis box that contains the categorical axis and call the Edit Value Order() function. Why you can't do this to the column directly, I'm not sure, but it won't work. JSL will return that it's Scriptable[ ], but then nothing happens.

 

Hope this helps!,

DS

AvgLizard122
Level I

Re: JSL command to call "Value Order" window

Thank you for your suggestion. I would like to have interative window for flexible input data. It could be change by time.

Currently I'm using your suggestion script but I'm finding more flexible way like call interactive window.

 

Regards,

ron_horne
Super User (Alumni)

Re: JSL command to call "Value Order" window

Hi @AvgLizard122 ,

this is not exactly answering you question but may be useful in this context.

if you want to order values in a systematic way see if this helps:


dt = Open( "/C:/Program Files/SAS/JMP/17/Samples/Data/Cars.jmp" );

// make summary table for ranking Make by Wt
dtsummary = dt << Summary( Group( :Make ), Mean( :Wt ), Freq( "None" ), Weight( "None" ));

// order the countries by frequency
dtsummary << Sort( By( :"Mean(Wt)"n ), Replace Table, Order( Descending ) );
order = dtsummary:Make << get as matrix;
dt:Make << set property( "value ordering", Eval( order ) );
close (dtsummary, no save);

this approach has the flexibility of producing value orders by any other variable of just the frequency of the categories.

let us know if this hepls.

AvgLizard122
Level I

Re: JSL command to call "Value Order" window

Thank you for your suggestion.

My data is not in systematic. It is in manual depends on each product. So, I cannot use numberics (sort from min to max) or sort by letter.

 

Regards,