none
InfoPath Drop Down Boxes Sort Order RRS feed

  • Question

  • Really puzzled here! 

    I have an InfoPath form which has several data connections to other lists on the site. When I preview the form all the drop-down lists are correctly alphabetized BUT when I publish the form to the site, several of the lists are not in alphabetical order.


    My users wont' be happy with jumbled lists.....

    Any ideas?
    Tuesday, February 9, 2010 7:51 PM

Answers

  • Man, I should really blog this so I don't have to keep answering it - my laziness is biting me in the rear.

    XRS, what happens in browser forms is that it ignores your default view settings and simply shows them in order of ID, which is an auto-incrementing number based on the order in which the items were added to the list/library.  To work around this, you will need to employ a new method of connecting lists for your browser forms, which is the XML method.  Here is the article that explains how to do it.  It's easy, but not as easy as a direct list connection:

    Populating form data from SharePoint List Views

    Basically, when doing this, you can create views that are pre-filtered and pre-sorted in the way that you'd like them to show up in the dropdown of the browser form.  You could make multiple connections to the same list but with different items in case you want filtered dropdowns.  We have to do it this way, because we can't filter the dropdown on the form side unfortunately due to filtering being unsupported.  This is a nice improvement in 2010 where filtering is supported AND you have new settings in 2010 that let you choose the sort field in the form template itself without relying on the SharePoint view.

    If you get to where you need/have to filter server-side based on InfoPath metadata, then you'll need to use code by leveraging SYM's method or by using the Qdaba qRules (in this, it's already built for you, and the qRules package has many other neat things).
    SharePoint Architect || My Blog
    • Proposed as answer by BobChauvin Wednesday, February 10, 2010 3:59 PM
    • Marked as answer by XRS_Master Wednesday, February 10, 2010 4:59 PM
    Wednesday, February 10, 2010 4:47 AM

All replies

  • It in general resembles the sort order as in the sharepoint list..
    May be initially you might have stored a copy of the data in your info path form while adding the data connection. Remove that option and publish it again..
    Tuesday, February 9, 2010 7:59 PM
  • Thanks Mahesh but that is not the case. The data has never been stored with the form.

    Since lists can have multiple views, which view would the form key off of?

    Thanks
    Tuesday, February 9, 2010 10:03 PM
  • Need to clarify situation.

    This is a browser based form. So sort works while in InfoPath but not in browser enable forms.

    Anyone have any suggestions?

    Wednesday, February 10, 2010 12:26 AM
  • Man, I should really blog this so I don't have to keep answering it - my laziness is biting me in the rear.

    XRS, what happens in browser forms is that it ignores your default view settings and simply shows them in order of ID, which is an auto-incrementing number based on the order in which the items were added to the list/library.  To work around this, you will need to employ a new method of connecting lists for your browser forms, which is the XML method.  Here is the article that explains how to do it.  It's easy, but not as easy as a direct list connection:

    Populating form data from SharePoint List Views

    Basically, when doing this, you can create views that are pre-filtered and pre-sorted in the way that you'd like them to show up in the dropdown of the browser form.  You could make multiple connections to the same list but with different items in case you want filtered dropdowns.  We have to do it this way, because we can't filter the dropdown on the form side unfortunately due to filtering being unsupported.  This is a nice improvement in 2010 where filtering is supported AND you have new settings in 2010 that let you choose the sort field in the form template itself without relying on the SharePoint view.

    If you get to where you need/have to filter server-side based on InfoPath metadata, then you'll need to use code by leveraging SYM's method or by using the Qdaba qRules (in this, it's already built for you, and the qRules package has many other neat things).
    SharePoint Architect || My Blog
    • Proposed as answer by BobChauvin Wednesday, February 10, 2010 3:59 PM
    • Marked as answer by XRS_Master Wednesday, February 10, 2010 4:59 PM
    Wednesday, February 10, 2010 4:47 AM
  • BTW, rich client forms draw from the default view, so if you ever need to change the filtering or sorting of your list data connection, simply create a new view with those settings and make it the default view...or if you don't want it to be default, then use the OWSSVR method above.
    SharePoint Architect || My Blog
    Wednesday, February 10, 2010 4:48 AM
  • Hi Clayton,

    The link you provided was the solution. This worked like a charm.


    Thanks again!
    Wednesday, February 10, 2010 5:01 PM
  • Hi Clayton,

    I followed what you refered to for creating the XML link and filtering the list. Everything works fine up to the point I need to look up the values from my newly created XML data connection.

    I'm experiencing a weird behavior with the way the data connection is reading the XML file in my drop down controls. When I attempt to set the "Entries" field to "z:row", I am prompted with the error "You must select a repeating group or field." I am also using SharePoint 2007 and InfoPath 2007.

    Is there a reason why this data connection is pulling the "z:row" field as a non-repeating? Am I missing a step?

    Thanks in advance

    Monday, May 14, 2012 5:54 AM
  • Hi Clayton

    Thanks for suggesting this article. In this article is shows how to arrange the items alphabetical manner in the dorpdown using XML file. But what is process to update this XML. Do we need to manually update this XML every time?

    Please suggest


    Regards

    Monday, October 1, 2012 10:46 AM