Sorting nodes populating dropdownlist - InfoPath Dev
in

InfoPath Dev

Sorting nodes populating dropdownlist

Last post 01-18-2006 05:37 AM by Coita Thierry. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 01-17-2006 02:34 AM

    Sorting nodes populating dropdownlist

    Hi all,
    I have a sets of nodes populating a dropdownlist. I'd like to display the fields in the dropdownlist in a sorting way without the need to sort the nodes in the XML. I can solve the problem with a correct XPath query for the data entry of the dropdownlist (I hope). Can anyone give me a suggestion?

    Thank u.
  • 01-17-2006 05:20 AM In reply to

    Re: Sorting nodes populating dropdownlist

    Hi,

    simply modify your view.xsl and add a xsl:sort under the xsl:for-each

    More information? ask

    ++

    Thierry
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 01-17-2006 06:08 AM In reply to

    Re: Sorting nodes populating dropdownlist

    Great!Simple and useful!But why not adding this useful add-on in the properties of dropdownlist?

    Thank u :)
  • 01-17-2006 08:49 PM In reply to

    Re: Sorting nodes populating dropdownlist

    Not sure of the answer. Maybe because it isn't roundtripped by the designer? You have to be careful modifying the XSL by hand. Some stuff won't be roundtripped unless you use a Preserve Code Block (PCB). In general, PCBs are carcinogenic and I highly discourage you from using them, but sometimes you just gotta go Full Trust and sometimes you just need a good dose of PCB.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 01-17-2006 11:46 PM In reply to

    Re: Sorting nodes populating dropdownlist

    xsl:sort works fine but you must insert it every time becouse when you save the template it is missed.
  • 01-18-2006 05:37 AM In reply to

    Re: Sorting nodes populating dropdownlist

    Like say Patrick you need to make a preserve code block if you want that infopath keep the xsl:sort or add this instruction only when you publish your form!

    More information here:
    http://www.infopathdev.com/howto/tips/default.aspx?i=ae7e79f32dcf4aa4a5f511883ebd8149

    ++

    Thierry
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.