Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have an InfoPath form with a drop-down-list, where the datasource is based on a sharepoint list. The listentries however seem to be random.

Is there any way to sort the data?

share|improve this question

3 Answers 3

What version of InfoPath are you using. Check out this post on how to create a xml datasource connection to the SharePoint list. This is for InfoPath 2007. http://blogs.msdn.com/b/infopath/archive/2007/01/15/populating-form-data-from-sharepoint-list-views.aspx Sometimes this method could be blocked by IT.

share|improve this answer

I think list items sort by word order. By the way, a few days ago, I had the same problem and I solved like this:

  1. Right click the dropdown
  2. Select the "Dropdown Properties"
  3. Below "Dropdown Options" you will see the data source. Click to "Add" button. It will open another window. Select "New Connection" and then "Get Data" and click next.
  4. Then select "SharePoint Library or List"
  5. On the next window, select your source list and click next.
  6. Then you will see all columns of your source list. You can sort your source list by any column. If you want a custom order, you can add a new column to your source list and sort this list by this column.

Hope this helps.

Erben.

share|improve this answer
1  
Actually they sort in the order in which they are presented in the default view of the target SharePoint list - the default view also governs some other behavior of this list-fetch method, such as item batch limits. –  Drew Lanclos Nov 6 '12 at 22:50
    
I don't think so. I choose columns to sort on InfoPath only. I think default view does not have any effect over InfoPath forms. –  compengTR Apr 12 '13 at 12:01
    
So, first off, my comment was only partially correct. I believe sorting in datasets was only added in InfoPath 2010, and I think it only works when forms are shown in the InfoPath client. That said, the default sorting when the access method is "SharePoint library or list" is by list item ID, and the only way to change this in InfoPath 2007 is to delete all the rows and re-add them in Datasheet view. When you access it by OWSSVR.dll, then the limits/sorting is based on the default view, as I stated above. So yes, it definitely can have an effect on InfoPath. –  Drew Lanclos Apr 12 '13 at 20:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.