Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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 :

<tr>
  <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>
  </xsl:attribute>

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?

share|improve this question
1  
Wish I could help you, friend! –  BGM Aug 8 '12 at 3:42
add comment

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"/>
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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