Skip Navigation LinksHome Page > Forums > SpiraTeam Forums > Spira Custom Reports > How do i reference a cust...
the template below lists all the custom fields and displays them with their values. How do I reference a specific custom field if I don't want all of them listed? When I tried referencing CUST_02 it displays the values (2,3,4) which is the index of the selected value but not the value itself (which should be text like "no workaround", "has workaround," "cosmetic").
I want my report to show the CUST_02 field and list the text . How do i do that?
This works to list all custom fields:
<xsl:for-each select="CustomProperties/CustomProperty">
<xsl:choose>
<xsl:when test="Type='Date'">
<td class="Date">
<xsl:call-template name="format-date">
<xsl:with-param name="datetime" select="Value" />
</xsl:call-template>
</td>
</xsl:when>
<xsl:otherwise>
<td>
<xsl:value-of select="Value" disable-output-escaping="yes" />
Hi Carlotta
Please use the following:
<xsl:value-of select="CustomProperties/CustomProperty[PropertyNumber="2"]/Value">
Regards
Jim
Jim when I try to use the statement you gave me in a report like this
<td><xsl:value-of select="Requirement/CustomProperties/CustomProperty[PropertyNumber="1"]/Value"></td
Please wait while your report is generated...
Name cannot begin with the '1' character, hexadecimal value 0x31. Line 18, position 90.
And if you have any questions, please email or call us at +1 (202) 558-6885