- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Help with Value Ordering
Best,
TS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Help with Value Ordering
Sorry for some of the confusion, this is the more extended version of my script
dt = current data table();
InputWindow = New Window( "Enter Input",
<<modal(),
Table Box(
String Col Box( "Results",
{"Results 01", "Results 02", "Results 03" }
),
Col Box(
"Final Results",
teb1 = Text Edit Box( "Blank Sample in wells" ),
teb2 = Text Edit Box( "Blank Sample in wells" ),
teb3 = Text Edit Box( "Blank Sample in wells" )
)
),
Button Box( "OK",
b1 = teb1 << Get Text;
b2 = teb2 << Get Text;
b3 = teb3 << Get Text;
)
);
Show(s1,s2,s3,);
dt=current data table();
Try( :Results[dt << get rows where( :Raw values== "01a" )] = b1 );
Try( :Results[dt << get rows where( :Raw values== "01b" )] = b1 );
Try( :Results[dt << get rows where( :Raw values== "02a" )] = b2 );
Try( :Results[dt << get rows where( :Raw values== "02b" )] = b2 );
Try( :Results[dt << get rows where( :Raw values== "03a" )] = b3 );
Try( :Results[dt << get rows where( :Raw values== "03b" )] = b3 );
Wait(0);
dt = current data table();
:Results<<set property("value ordering", {"Buffer", b1, b2, b3});
dt = current data table();
dt << Sort(By(:Results),Order(Ascending),Replace Table);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Help with Value Ordering
Hi,
I'm still not clear what you are trying to do but the following slightly modified script does not return any error in the Log (see the Eval List call at the bottom)
Names Default to Here (1);
dt = current data table();
InputWindow = New Window( "Enter Input",
<<modal(),
Table Box(
String Col Box( "Results",
{"Results 01", "Results 02", "Results 03" }
),
Col Box(
"Final Results",
teb1 = Text Edit Box( "Blank Sample in wells" ),
teb2 = Text Edit Box( "Blank Sample in wells" ),
teb3 = Text Edit Box( "Blank Sample in wells" )
)
),
Button Box( "OK",
b1 = teb1 << Get Text;
b2 = teb2 << Get Text;
b3 = teb3 << Get Text;
)
);
Show(b1,b2,b3,);
dt=current data table();
Try( :Results[dt << get rows where( :Raw values== "01a" )] = b1 );
Try( :Results[dt << get rows where( :Raw values== "01b" )] = b1 );
Try( :Results[dt << get rows where( :Raw values== "02a" )] = b2 );
Try( :Results[dt << get rows where( :Raw values== "02b" )] = b2 );
Try( :Results[dt << get rows where( :Raw values== "03a" )] = b3 );
Try( :Results[dt << get rows where( :Raw values== "03b" )] = b3 );
Wait(0);
dt = current data table();
:Results<<set property("value ordering", Eval List({"Buffer", b1, b2, b3}));
dt = current data table();
dt << Sort(By(:Results),Order(Ascending),Replace Table);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Help with Value Ordering
Lets say the user input the following for sample names in the text edit box:
C for b1
B for b2
A for b3
then the column order becomes "Buffer", b3, b2, b1 when I run the script, it follows an alphabetical order. I want the script to run so that the column order remains "Buffer", b1, b2, b3 no matter what is input as sample names.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Help with Value Ordering
I believe that the latest script I uploaded in my previous message performs the way you want. Have you tried it?
Best,
TS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Help with Value Ordering
- « Previous
-
- 1
- 2
- Next »