I've got an xslt list view. I have one column that should be used in the xslt calculation (shown as a row tooltip) but it should not be visible as a column in the list.

Question: Must the column be included in the viewfields list in order to be used in the transform? If so, how can I prevent that column from beeing shown? (not using spd)

  • Just a future visitor FYI, see user14949's answer below for the quickest method (it requires adding two words to one line in the view aspx, using SharePoint Designer).
    – Matthew
    Aug 20, 2013 at 10:13

3 Answers 3


The XSLT will basically draw a template of HTML which wraps the output of the data query. If you look through the XSLT you'll see various TR TD html elements around which draw the table.

You will need to remove the TD elements which represent the column which you are trying to hide.

This is easiest done with SharePoint Designer as you'll have the syntax highlighting and instant feedback through the Design Window to see what you're doing.

For a walkthrough of how the XSLT works with DataViewWebParts (functionally similar to the XLV), have a quick scan through Marc Anderson's blog series on this:


I also wrote a blog post on cleaning up the XSLT to draw the output the way I wanted, have a look here:


  • Agree that SPD is a better tool for doing this.
    – SPDoctor
    Apr 4, 2011 at 8:57
  • user14949's answer below works, and does not require removing table elements. the Explicit property, added to the FieldRef, hides the column from my view.
    – Matthew
    Aug 20, 2013 at 10:11

Explicit attribute will hide the column in the webpart <FieldRef Name="LinkFilename" Explicit="TRUE"/>

  • This was exactly what I needed. Searched for "Hide FieldRef" and bingo. Thanks.
    – Matthew
    Aug 20, 2013 at 10:10

You can use an identity transformation to see the xml that is being sent to the XSLT engine.

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="@*|node()">
      <xsl:apply-templates select="@*|node()"/>

You can use this to check if you are seeing all the fields you need in the XML passed to the XSLT engine.

Suppressing the output of the column can be achieved by modifying the XSLT, depending on how comfortable you are editing XSLT. Personally I don't think it's as bad a some people say it is!

  • Hi! Thanks for looking into this. Yes, I think it's time to really start learning the xslt...
    – Larsi
    Apr 4, 2011 at 8:49
  • Your XSLT is transforming an XML input document containing the field values. The identity transform renders this without change, enabling you to check that all the fields you need (for your calculation) are there. So you can temporarily replace your XSLT with the sample above, for diagnostic purposes.
    – SPDoctor
    Apr 4, 2011 at 8:52

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.