SharePoint CAML query Orderby does not support descending attribute.? -


Trying to get data from the SharePoint list using the CAML query.

Feeling deserving, do not do the desired work.

Please find the code below. & lt; Order B & gt; & Lt; FieldRef name = 'id' Descending = 'True' / & gt; & Lt; / OrderBy & gt;

The above code still receives the smallest ID (where the id is 1,2,3 ..), in my case this ID = 1

Thanks in advance.

AFAIK, there is no "descending" attribute to specify a descending order.

Instead, you have to use the ascending attribute, and "false" must be specified as values.

  & lt; OrderBy & gt; & Lt; FieldRef name = 'id' ascending = 'FALSE' /> & Lt; / OrderBy & gt;   

As you can see

ascending - optional boolean specifies sort order on a FieldRef element Defined in a scene. The default value is TRUE.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -