SharePoint 2013: How to sort your lookup column dropdown list (using InfoPath) - Fabian Neve

About SharePoint, Javascript, PowerShell, and other technical stuff

Thursday, November 12, 2015

SharePoint 2013: How to sort your lookup column dropdown list (using InfoPath)

When we create a lookup column in a SharePoint list it is automatically sorted by the alphabetic values of our lookup column in ascending order, regardless of the items id or their created date, and we don’t have an out of the box choice in this matter.

But by modifying your SharePoint List with InfoPath, it is possible to customize your sorting.

First, open the list where you are using your lookup columns. Click on "Customize Form".

 Then, in InfoPath, click on DATA Ribbon and select "Data Connections".


This will open a wizard. Click on "Add..." to add a new Data Connection.


Because we need to receive data from a list, we choose the default selection:


We are retreiving our data from a SharePoint List or Library, so...


Now insert your SharePoint Site (not List nor Library. Your Site).


Now I can select my list where I get the data from.


I select the columns which I need and NOW comes the important part, where we are able to configure the sort order. Because I want to sort my "Datum" column in descending order (newest on top), I choose "Descending".


Simply insert new name for this data connection:


And now you've got a new entry in "Data Connections":


And this is how it looks like in SharePoint:


My dropdown-list in descending order.

You will find more on this topic in this blog post.

1 comment:

  1. Hi,

    I am able to sort columns in descending order, however my dropdown has more than 100 values and on sorting it in descending order, dropdown scrollbar takes me to end of drop down(i.e. to last value of dropdown). Is there any way we can restrict dropdown to stay on first value after sorting. Thank You!!

    ReplyDelete