Caml Query with Orderby Condition for dropdown columns in SharePoint

Caml Query with Orderby Condition for dropdown columns in SharePoint
InfoPath alternatives for form designing SharePoint

In this post we will discuss how to use CAML Query with Order by condition for dropdown columns in SharePoint 2013.

When I was working with one list having 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

Then add this column and use this column in orderby instead of dropdown column. This will solve the problem.
Hope this helps some one.

Similar SharePoint 2013 Tutorials


Leave a Reply