The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 wsort and "Criteria Columns has repeated elements"

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
cdrozdowski111 Posted - 03/22/2013 : 05:29:41 AM
OriginPro 9.0.0 SR1, Win7 64-bit, running in VMware Fusion 5.0.2

I am trying to sort some text columns (code snippet below) using the wsort X-function and get the following message (and the sorting fails):

"Criteria Columns has repeated elements"

I can use the -sb switch to suppress the message but they sorting still fails. Is there anyway to overcome this? If not, is there another mechanism I could use to for this sort?


dataset dsSortCols = {2, 4};
dataset dsSortOrd = {2, 4};
wsort nestcols:=dsSortCols order:=dsSortOrd;

1   L A T E S T    R E P L I E S    (Newest First)
Penn Posted - 03/24/2013 : 9:51:24 PM
Hi,

The order parameter is not right in your script. In your script, you want to sort the active worksheet firstly according to the 2nd column, then according to the 4th column, right?. However, how to sort the worksheet (ascending or descending) is not correct, which is specified by order in your script. The elements of the dataset dsSortOrd can only be 0 (for descending) or 1 (for ascending). For more details, you can refer to the example in XF Script Dialog, which is opened by pressing F11, then see wsort under Data Manipulation\Worksheet.

Penn

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000