none
My lookup column isn't showing up correctly in my custom display form???

    Question

  • I created custom forms for one of my lists. I have one lookup column (building list) that is included in all three forms (new, edit, display). The lookup shows up correctly in the new and edit forms, but in the display form, this shows up instead of the building name:

    <a href="http://_layouts/listform.aspx?PageType=4&ListId={E44F1BB1-96DF-4CD5-8303-665F709DC8EB}&ID=118&RootFolder=*">JOHN</a><a href="http://parrothead/_layouts/listform.aspx?PageType=4&ListId={E44F1BB1-96DF-4CD5-8303-665F709DC8EB}&ID=118&RootFolder=*">JOHN</a>

    In SPD, the current data source for all of the other columns shows the fields filled in from one of my items, but the lookup column field is blank. Here's the coding associated with the column:

    <td width="190px" valign="top" class="ms-formlabel">
           <H3 class="ms-standardheader">
            <nobr>Project Building</nobr>
           </H3>
          </td>
          <td width="400px" valign="top" class="ms-formbody">
           <xsl:value-of select="@Project_x0020_Building"/></td>

    Any thoughts?


    Thursday, August 04, 2011 7:47 PM

Answers

  • Hi Bean224,

     

    Please try adding the attribute-value-pair, disable-output-escaping="yes", after the select attribute in your xsl:value element. For example:

    <xsl:value-of select="@Project_x0020_Building" disable-output-escaping="yes" />

     

    HTH,

     

    Chris

     

    Thursday, August 04, 2011 8:38 PM
  • This worked for me:

     

    1) Open the display form in SPD.

    2) Click Design (at the bottom).

    3) Right click on the "<a href ..." section of code. It should become highlighted and bring up a menu.

    4) Select Format Item As - > Label

     

    I still can't figure out how to make the other columns to display in the custom display form, though. Only the main lookup field shows up, but none of the other ones I've selected to display.

    Friday, August 05, 2011 5:50 PM

All replies

  • Hi Bean224,

     

    Please try adding the attribute-value-pair, disable-output-escaping="yes", after the select attribute in your xsl:value element. For example:

    <xsl:value-of select="@Project_x0020_Building" disable-output-escaping="yes" />

     

    HTH,

     

    Chris

     

    Thursday, August 04, 2011 8:38 PM
  • This worked for me:

     

    1) Open the display form in SPD.

    2) Click Design (at the bottom).

    3) Right click on the "<a href ..." section of code. It should become highlighted and bring up a menu.

    4) Select Format Item As - > Label

     

    I still can't figure out how to make the other columns to display in the custom display form, though. Only the main lookup field shows up, but none of the other ones I've selected to display.

    Friday, August 05, 2011 5:50 PM