Unfortunately, there is no way to sort the list using the InfoPath Designer. However, you can extract the form files and edit the XSL to make this happen. You can add xsl:sort to do sorting. However, you will need to add the xd
![Stick Out Tongue :p :p](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
reserve attribute to your template so that you will be able to open your Form Template in the Designer without losting your changes. Here is an example of template that has the xd
![Stick Out Tongue :p :p](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
reserve attribute (from the InfoPath SDK):
<xsl:template match="my:field1" mode="xd
![Stick Out Tongue :p :p](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
reserve">
<div>
The value of field1 is <xsl:value-of select="."/>
</div>
</xsl:template>
You would then place all the XSL for the list inside of this template and add the xsl:sort statement in the xsl:for-each for the list. The xsl:for-each would look something like this:
<xsl:for-each select="my:group1/my:group2">
<xsl:sort select="my:field2" order="ascending"/>
<option>
<xsl:attribute name="value">
<xsl:value-of select="my:field2"/>
</xsl:attribute>
<xsl:if test="$val=my:field2">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>
<xsl:value-of select="my:field2"/>
</option>
</xsl:for-each>
I hope this helps.
- Scott