Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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
1  
can you indent your xml snippets, it's quite unreadable –  Steve B Jun 6 '12 at 15:12
add comment

1 Answer

up vote 1 down vote accepted

Ok, I figured it out:

<Webs Scope='Recursive'></Webs>
<Lists>
    <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>
</Lists>
<View>
    <ViewFields>
       <FieldRef Name='FileLeafRef'/>
       <FieldRef Name='FileRef'/>
       <FieldRef Name='Modified'/>
       <FieldRef Name='Editor'/>
    </ViewFields>
</View>
<Query>
    <OrderBy>
       <FieldRef Name='Modified' Ascending='FALSE'/>
    </OrderBy>
</Query>

Hope this helps someone else out!!

share|improve this answer
add comment

Your Answer

 
discard

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.