SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm calling web service List.asmx using Jquery and getting results using this but its not ordering by DisplayOrder. This is the caml query.

        <soapenv:Envelope xmlns:soapenv=''> \
            <soapenv:Body> \
                 <GetListItems xmlns=''> \
                    <listName>Master-Footer-Links</listName> \
                    <viewFields> \
                        <ViewFields> \
                           <FieldRef Name='Title' /> \
                           <FieldRef Name='DisplayOrder' /> \
                           <FieldRef Name='Url' /> \
                       </ViewFields> \
                    </viewFields> \
                    <Query> \
                        <OrderBy><FieldRef Name='DisplayOrder' Ascending='TRUE' /></OrderBy> \
                    </Query> \
                </GetListItems> \
            </soapenv:Body> \
share|improve this question
up vote 5 down vote accepted

You need to wrap your Query node inside a query node so that it looks like this:

    <OrderBy><FieldRef Name='DisplayOrder' Ascending='TRUE' /></OrderBy>
share|improve this answer

It sounds like your DisplayOrder column type is set to contain strings or text instead of numbers. If you open the list and navigate to Settings -> List Settings then scroll down to Columns, what is the type next to DisplayOrder? If it is "single line of text" or some other string type you can switch the type. Click the name of your column and change the type to "Number (1, 10, 100)" and click OK. You will receive a message about possible loss of data (make sure to have a backup of your list first if this is important data) and click OK on the popup. When you query your list now you should receive numerical sorting instead of alphabetical.

I found this info from this url.

Hopefully you will resolve your issue by this.


Ashish Chotalia

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.