Question

I have a checkbox field in the sharepoint list. Then i want to display the list in the list using Dataview webpart. The issue that i am having that the checkbox value is not returned as expected since it all returned value No although some record has a value yes.

This the xml that i have so far:

 <td class="ms-vb">
    <xsl:choose>
        <xsl:when test="@Within_x0020_Product_x003F_='1' or msxsl:string-compare(string(@Within_x0020_Product_x003F_),'Yes','','i')=0 or msxsl:string-compare(string(@Within_x0020_Product_x003F_),'True','','i')=0">Yes</xsl:when>
        <xsl:otherwise>No</xsl:otherwise>
    </xsl:choose>
 </td>

Please advise what i am doing wrong. Thank you

Was it helpful?

Solution

Try this

<xsl:choose>
    <xsl:when test="@Within_x0020_Product_x003F_=1">Yes</xsl:when>
    <xsl:otherwise>No</xsl:otherwise>
</xsl:choose>
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top