I have a custom xsl file that I use to show items in bold when a boolean fields equals to false.

I've set up the xsl using SharePoint Designer, then I exported the Xsl node in a xsl file. I deploy this xsl file using a feature, and I reference it from views node in a list schema using the XslLink node.

My condition is this one :

  <xsl:attribute name="style">
    <xsl:if test="normalize-space($thisNode/@IsRead.value) != '1'"
            ddwrt:cf_explicit="1">font-weight: bolder;</xsl:if>
    <xsl:if test="$Collapse">display:none;</xsl:if>

When the IsRead is false, the row should appears in bold.

This condition is working only if I include the field in the viewfields of my view. If I remove it, the condition is always true.

I remove the field from the viewfields, because I don't want to display the value of field, just using it for display rule.

Can I use a non displayed field in a formatting rule ? How can I avoid to put my field in the viewfields?

  • 1
    Wish I could help you, friend!
    – bgmCoder
    Aug 8, 2012 at 3:42

1 Answer 1


Not sure on the rest, but you can specify the field in question in your view in SPD that you want to use in XSLT only, but not display in the view:

<FieldRef Name="<FieldInternalName>" Explicit="TRUE"/>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.