I'll open with the background, then ask my question after.


I am modifying a list view for a SP 2010 list. I use an XSLT template for a field. I select this row, then implement a choice. When a certain condition is not met, the template performs the standard selection (which displays that field's normal content). Otherwise, I select the value of a different field (not normally shown in the view) and insert that into the display instead.

In SPD 2010, everything renders correctly. In my browser, however, the otherwise path (inserting the second field's value into the first field) does not appear to work -- the alternate field's content is not written to the DOM, it's simply skipped.

There are no errors thrown in the browser, and there are no HTML incompatibility errors listed by SPD around that part of the page. Failure exists in multiple browsers.

I've looked for a previous location that this template is called (I've edited an existing template that normally drew the cell for all rows, which is why it works for the alternate field content), but cannot find it being called before the point where I edited it. So, I don't believe that there is a condition for firing the template that I'm missing.

My question is, what next steps would you take to troubleshoot the problem? Specifically, do you know of a gremlin that would fail to generate errors, but still result in XSLT being rendered differently in SPD vs a browser window?

I get the feeling it's something to do with SPD assuming a field is included vs a browser requiring it explicitly declared, but I'm not certain where I would ascertain that.


1 Answer 1


Columns need to be included in the view for XSLT to display them - that would be my first suggestion - modify the view to ensure the column is included. This may mean you need to tweak your XSLT further to ensure it does not just automatically add the new column to the standard view.

  • Do you know a way to add a FieldRef to the column list but hide the column from display? A "Hidden" attribute in the FieldRef doesn't work.
    – Matthew
    Aug 20, 2013 at 10:06
  • Found the answer here (add the Explicit="TRUE" tag to the FieldRef and it won't be drawn): sharepoint.stackexchange.com/questions/10700/…
    – Matthew
    Aug 20, 2013 at 10:14
  • Added to the view columns list and my other transforms just worked. Thanks Dave.
    – Matthew
    Aug 20, 2013 at 10:16
  • Excellent - glad you got it sorted :) Aug 20, 2013 at 11:54

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.