Question

We have an InfoPath 2007 form that populates a drop down from a SharePoint 2007 list of Employees. However, when opening the form in the browser (like it is designed to do) it does not alphabetize the drop down. But if i open the form on my computer, it does.

Anyone else come across this issue and have a solution to it?

I am wondering if it has to do with the indexing of the list, where if opened in the browser, if it sorts by the ID number that is assigned, where when on the computer it sorts by value.

Was it helpful?

Solution

Looks like View-based sorting is not supported in browser-enabled form templates because it requires manual hand editing of the view XSL file Refer

Options you have are

  1. Hand edit the xsl
  2. Write custom code on the load event and sort it

For more tricks refer to this link

One good example that works like charm is here

OTHER TIPS

Instead of adding the List as a Data Source, add the Data View XML of the list as the data source.

You can locate the Data View XML of the list by using this URL:

<Site URL>/_vti_bin/owssvr.dll?Cmd=Display&List={<GUID of the List>}&XMLDATA=TRUE&SortField=<Internal name of the Field that you want to Sort>&SortDir=Asc

Use this XML file as the data source in your InfoPath form, the dropdowns will be sorted according to the field you have specified.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top