SharePoint CAML Query Order by Example with Dropdown in SharePoint Online/2013/2016

Caml Query with Orderby Condition for dropdown columns in SharePoint

In this SharePoint 2013 caml query tutorial we will discuss how to use SharePoint CAML Query Order by in SharePoint 2013/2016/Online. In this example, we will use CAML Query with Order by a condition for a dropdown column in SharePoint 2013.


When I was working with one SharePoint 2013 list having a dropdown column with values from 1 to 13.

I want to filter data order by the dropdown column. But when we use dropdown column directly in caml query it will not filter in the same order as it will consider 1, 10, 11, 12, 13, 2,3,4.. in this order.

For such type of requirement just create one more calculated column as shown below:

Caml Query with Orderby Condition for dropdown columns in SharePoint
Caml Query with Orderby Condition for dropdown columns in SharePoint

You may like following SharePoint CAML Query examples:



Then add this column and use this column in order by instead of dropdown column. This will solve the problem. Hope this helps someone.

Check out Best Alternative to InfoPath -> Try Now

You May Also like the Following SharePoint Online Tutorials: