SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

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 been working on a crosslist for a document library named shared documents. I have gotten my dataviewwebpart to grab all documents from every directory using:

<Webs Scope='Recursive'></Webs><Lists ServerTemplate='101'></Lists><View><ViewFields><FieldRef Name='FileLeafRef'/><FieldRef Name='FileRef'/><FieldRef Name='Modified'/><FieldRef Name='Editor'/></ViewFields></View>

However, I don't want every document from every document directory, only the "shared documents" directory.

Any body got any ideas on how to define that in the selectCommand? I tried:

<Lists><List Name='Shared Documents'></List></Lists>

Thanks for your help!

share|improve this question
can you indent your xml snippets, it's quite unreadable – Steve B Jun 6 '12 at 15:12
up vote 1 down vote accepted

Ok, I figured it out:

<Webs Scope='Recursive'></Webs>
    <List ID='A3466B28-090D-4480-B1F1-4C2260015F40'></List>
    <List ID='5F51BA17-84E8-455D-9D0E-706A0368C591'></List>
    <List ID='22928469-54C9-4475-9FFD-C245236FC989'></List>
    <List ID='734FE406-05D9-460D-A175-990183E09071'></List>
       <FieldRef Name='FileLeafRef'/>
       <FieldRef Name='FileRef'/>
       <FieldRef Name='Modified'/>
       <FieldRef Name='Editor'/>
       <FieldRef Name='Modified' Ascending='FALSE'/>

Hope this helps someone else out!!

share|improve this answer

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.