cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
shah47
Level II

Help with Value Ordering

So I want to order my column a certain way by using the Value ordering property. In this case b1, b2 and b3 are user inputs from Text Edit Box but still the ordering in the column does not follow {"Buffer", b1, b2, b3} it follows an alphabetical order.

dt = current data table();

:Results<<set property("value ordering", {"Buffer", b1, b2, b3});

 I also tried the following after value ordering but it doesn't help

dt << Sort(By(:Results),Order(Ascending),Replace Table);

 

15 REPLIES 15
ron_horne
Super User (Alumni)

Re: Help with Value Ordering

Hi @shah47 

try the following:

dt = current data table();

:Results<<set property("value ordering", {"Buffer", "b1", "b2", "b3"});

once this is correct, the sorting should work as well,

ron

Re: Help with Value Ordering

I am not sure but try this:

 

:Results << Set Property( "Value Ordering", Eval List( {"Buffer", b1, b2, b3} ) );
shah47
Level II

Re: Help with Value Ordering

Thanks all for the prompt reply, unfortunately it still reverts the column order by alphabetical 

ron_horne
Super User (Alumni)

Re: Help with Value Ordering

@shah47 

can you upload a table with just that column?

 

shah47
Level II

Re: Help with Value Ordering

Hi @ron_horne 

 

I have attached the column, just to recap, the user inputs are captured as b1, b2, etc. In this instance I did a test and inputed "B" for b1 and "A" for b2 but as you can see the order in the table comes out as alphabetical.

Thierry_S
Super User

Re: Help with Value Ordering

Hi Based on the table you shared,

 

Here is a short script that should do what you want: just change the order of the values in the Set property call

Names Default to Here (1);

dt = Current Data Table ();

:Results << set property("value ordering", {"Blank Sample Well", "Running Buffe", "Buffer", "A", "B"});

dt << Sort( replace table, By( :Results ), Order( Ascending ) );
Thierry R. Sornasse
shah47
Level II

Re: Help with Value Ordering

Hi @Thierry_S 

 

Thanks but that solution will not work for what I'm trying to do. "A" and "B" are user inputs captured by b1, b2, etc with a Text Edit Box. So after the user inputs the values for b1, b2, the column order defaults to alphabetical. 

ron_horne
Super User (Alumni)

Re: Help with Value Ordering

Hi @shah47 

I think @Mark_Bailey got it right.

Pleas open the attached file and see if the scripts do the job.

names default to here (1);

a = "Running Buffe"
b1 = "B";
b2 = "A";
b3 = "Blank Sample in well";
b4 = "Buffer";
:Results << Set Property( "Value Ordering", Eval List( {a, b1, b2, b3, b4} ) );
Thierry_S
Super User

Re: Help with Value Ordering

Hi Shah,
Sorry that my short script did not do the job. I'm trying to figure out what you mean by "user inputs captured by b1, b2"? Are these numerical values or other labels for the specific assay condition?
Best,
TS
Thierry R. Sornasse