SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have successfully created a DVWP which queries all lists in my subsites and returns the correct columns using the following selectcommand:

      <Webs Scope="Recursive"></Webs>
          <FieldRef Name="Development_x0020_Status" />
          <FieldRef Name="Title" />
          <FieldRef Name="FileDirRef" />
          <FieldRef Name="ID" />
          <FieldRef Name="StreamName" />
          <FieldRef Name="StreamName" Ascending="TRUE" />
          <FieldRef Name="Title" Ascending="TRUE" />

One of the things i would now like to be able to do is group the results by the site that the item is located, much the same as a CWQP does group by . The query currently returns the webId, but I cannot see how to return the site name. How can i return this value?

share|improve this question
up vote 0 down vote accepted

Yes, you can do this by accessing the Project properties. (List properties are also available.) See my blog post called Project and List Properties Available from CAML.


share|improve this answer
Thankyou. Worked perfectly first time. – Clayton Firth Mar 18 '10 at 2:54
You bet. Glad to help. – Marc D Anderson Mar 18 '10 at 3:00

Your Answer


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.