Question

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!

Was it helpful?

Solution

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!!

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top