Drop-Down list in view1.xsl - InfoPath Dev
in

InfoPath Dev

Drop-Down list in view1.xsl

Last post 03-08-2006 08:23 AM by Agni Jonnalagadda. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 03-07-2006 06:01 AM

    Drop-Down list in view1.xsl

    hi

    I want to create a drop-down box with the content of more then one Field. To do this i have edited (blue text) following code in my view1.xsl file.


    <xsl:attribute name="value">
    <xsl:value-of select="my:Schl_risk/my:field42"/>
    </xsl:attribute>
    <option>
    <xsl:if test="my:Schl_risk/my:field42="test33"">
    <xsl:attribute name="selected">selected</xsl:attribute>
    </xsl:if>
    <xsl:value-of select="my:Schl_risk/my:Kredi_risk1"/>
    </option>


    every time i make a change in the InfoPath Designer the manually entered line is removed.

    What can i do to work around this failure?

    thx
    Patrick
  • 03-07-2006 10:56 AM In reply to

    Re: Drop-Down list in view1.xsl

    Hi Patrick,
    Welcome to the board!
    InfoPath by default removes foreign code from the XSL when ever the view is changed. If you dont want this to be done you need to use xd:preserve code block.
    Tknow more about "xd:preserve" look at
    http://www.infopathdev.com/howto/tips/default.aspx?i=ae7e79f32dcf4aa4a5f511883ebd8149
  • 03-08-2006 04:29 AM In reply to

    Re: Drop-Down list in view1.xsl

    hi, thanks for your answer. i copied this example code to my xsl file. It works fine in the preview mode, but when i make change in the design mode. The code that i've copy pasted was overwrited again.
    What i do wrong, did you have another workaround for this?
    thx for your answer!
    Patrick
  • 03-08-2006 08:23 AM In reply to

    Re: Drop-Down list in view1.xsl

    Hi,
    Other option is simple and advisable than xd:preserve,
    copy all the values that you want to show in the dropdown to repeating nodes(2DS) and bind the dropdown to show those values.
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.