Hi -
I've been trying to use Greg Collins' suggestions for showing multiple fields on a dropdown list ("Display Multiple Fields in a Drop-Down List Box"), but I can't seem to get it to work. I'm using Infopath 2003 SP2.
I've even tried it using the following simple test form to try to get it work. The problem I'm having is that, unlike Greg's example, I see multiple lines that have "<xsl:value-of select=" and no matter which I replace with a concatanation of fields, the drop down continues to show only the original field. Below is the latest version of the view1.xsl file for my simplified test, where I've tried to concantenate some simple text to the end of the drop down and that doesn't even work:
Clearly I must be missing something...Any advice would be greatly appreciated.
<div>Test: <select class="xdComboBox xdBehavior_Select" title="" style="WIDTH: 130px" size="1" xd:CtrlId="CTRL1" xd:xctname="DropDown" value="" xd:boundProp="value" xd:binding="my:testco" tabIndex="0">
<xsl:attribute name="value">
<xsl:value-of select="my:testco"/>
</xsl:attribute>
<xsl:choose>
<xsl:when test="function-available('xdXDocument:GetDOM')">
<option/>
<xsl:variable name="val" select="my:testco"/>
<xsl:if test="not(business_units/bus_unit[.=$val] or $val='')">
<option selected="selected">
<xsl:attribute name="value">
<xsl:value-of select="$val"/>
</xsl:attribute>
<xsl:value-of select="$val"/>
</option>
</xsl:if>
<xsl:for-each select="business_units/bus_unit">
<option>
<xsl:attribute name="value">
<xsl:value-of select="."/>
</xsl:attribute>
<xsl:if test="$val=.">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>
<xsl:value-of select="."/>
</option>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<option>
<xsl:value-of select="concat(my:testco, 'test')"/>
</option>
</xsl:otherwise>
</xsl:choose>
</select>
Am I editing the wrong line of code? Is there something I need to do to enable the change?
Thanks!