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

- JMP User Community
- :
- Discussions
- :
- Help with Value Ordering

- 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

Help with Value Ordering

Sep 27, 2019 9:01 AM
(1254 views)

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

Highlighted
##

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

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

Highlighted
##

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

Re: Help with Value Ordering

I am not sure but try this:

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

Learn it once, use it forever!

Highlighted
##

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

Re: Help with Value Ordering

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

Highlighted
##

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

Re: Help with Value Ordering

Highlighted
##

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

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.

Highlighted
##

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

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

Highlighted
##

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

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.

Highlighted
##

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

Re: Help with Value Ordering

Hi @shah47

I think @markbailey 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} ) );
```

Highlighted
##

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

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

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

Article Labels

There are no labels assigned to this post.