In Sharepoint Designer, I have a Data View Web Part which pulls data from a list.

(In a normal situation) if I select a Person or Group field explicitly within the CAML for the Data Source, the display name is shown, however, if I omit the ViewFields node entirely from the CAML (such that the CAML effectively does SELECT * FROM), the Person or Group field returns a full HTML node which displays the online presence and provides interaction through a smart menu.

My issue is that my current DVWP (for this specific list) will fail with a "Non-specific error when trying to get data from the Data Source", if I include this specific Person or Group column (internal name "Sourced_x0020_By"). It will work fine if I omit ViewFields entirely, but shows the HTML.

Is there another way to retrieve only the Display Name for a Person or Group other than explicitly selecting the Field in ViewFields?

Or does anyone know a reason why a DataSource will break if asked to retrieve a Person or Group field?

2 Answers 2


Answering my own question! Whatever next?

Well, I figured it out. In the value-of statement which displays the Person or Group field, I simply need to disable "output-escaping", so the web part actually renders the HTML instead of simply displaying the raw text.

<xsl:value-of select="@Sourced_x0020_By"  disable-output-escaping="yes" />

This is probably another case where SharePoint Designer is getting confused. The common dialogs only take you so far. Are you adding the Sourced_x0020_By column into the CAML manually or via the dialogs?

What I usually do is substring out the user's name from the HTML. See my post over on EndUserSharePoint.com about this.

  • Yes I'm adding the column manually into the CAML. At this stage I'm not relying on UI at all.
    – James Love
    Apr 12, 2010 at 14:38
  • So I'm a little confused by "f I select a Person or Group field explicitly within the CAML for the Data Source, the display name is shown". If you get the error, then how is it shown? Apr 12, 2010 at 15:01
  • I should've made this a little cleared - in that instance, it was for another list & view that I have that displays the PoG field.
    – James Love
    Apr 12, 2010 at 15:46

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.