Skip to main content
Tweeted twitter.com/StackSharePoint/status/1291343265443323904
removed the unneeded visual studio tag. Also reformatted so that the nesting error with the order by is more visible
Source Link

get Get the items in descending order using caml query

i am trying to get the comments from Comment List in a 'Descending' order , the query that i am using is :

"<Where>" +
  "<Eq>" +
    "<FieldRef Name='TopicID' /><Value Type='Text'>" + ProjectID + "</Value>" +
   "</Eq>" +
      " <OrderBy>"+
    "<FieldRef Name='Created' Ascending='False' />"+
       " </OrderBy>"+   
"</Where>";

but this query gives me the result in 'Ascending' order even if i set it to false. what is wrong here?

get the items in descending order using caml query

i am trying to get the comments from Comment List in a 'Descending' order , the query that i am using is :

"<Where>" +
 "<Eq>" +
    "<FieldRef Name='TopicID' /><Value Type='Text'>" + ProjectID + "</Value>" +
   "</Eq>" +
      " <OrderBy>"+
   "<FieldRef Name='Created' Ascending='False' />"+
       " </OrderBy>"+  "</Where>";

but this query gives me the result in 'Ascending' order even if i set it to false. what is wrong here?

Get the items in descending order using caml query

i am trying to get the comments from Comment List in a 'Descending' order , the query that i am using is :

"<Where>" +
  "<Eq>" +
    "<FieldRef Name='TopicID' /><Value Type='Text'>" + ProjectID + "</Value>" +
  "</Eq>" +
  " <OrderBy>"+
    "<FieldRef Name='Created' Ascending='False' />"+
  " </OrderBy>"+   
"</Where>";

but this query gives me the result in 'Ascending' order even if i set it to false. what is wrong here?

Source Link
Revenant_01
  • 169
  • 1
  • 5
  • 19

get the items in descending order using caml query

i am trying to get the comments from Comment List in a 'Descending' order , the query that i am using is :

"<Where>" +
 "<Eq>" +
    "<FieldRef Name='TopicID' /><Value Type='Text'>" + ProjectID + "</Value>" +
   "</Eq>" +
      " <OrderBy>"+
   "<FieldRef Name='Created' Ascending='False' />"+
       " </OrderBy>"+  "</Where>";

but this query gives me the result in 'Ascending' order even if i set it to false. what is wrong here?