Sign up ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

How would I use SPServices GetListItems and still be able to add Ascending=False to the CAMLViewFields? I haven't used this for long and I am just wondering if this is possible?

Thanks as always!

share|improve this question

1 Answer 1

up vote 4 down vote accepted

You can specify the Ascending=False as an attribute of the FieldRef in the OrderBy element.

    operation: "GetListItems",
    async: false,
    listName: "EmployeeList",
    CAMLViewFields: "<ViewFields></ViewFields>",
    CAMLQuery: "<Query><Where><Eq><FieldRef Name='EmployeeID'/><Value Type='Text'>1</Value></Eq></Where><OrderBy><FieldRef Name='Created' Ascending='False' /></OrderBy></Query>",
    CAMLRowLimit: 1,
    completefunc: function (xData, Status) {

share|improve this answer
perfect! thanks; greatly appreciated! –  Justin Aug 19 '12 at 0:19

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.