Reputation: 233
I have document library in which several folders, in one of them I have sub-folder that I need to display in custom view. So, position of that folder is like Doc.Library > Folder2 > Internet.
I found several examples how to display Folder instead of whole Library in custom view, with help of CAML query in SPD2013.
Here is what I have in my custom view:
<Where>
<Contains>
<FieldRef Name="FileRef"/>
<Value Type="Text">Internet</Value>
</Contains>
</Where>
Now comes part which gives me problem, with this query, I get blank page, no documents are visible. If I put Folder2 instead of Internet I see documents but I see all documents of Folder2 folder, which I don't need.
So, my question is how can I manage to show Internet folder only?
I tried several other options, instead of Text to put Lookup, FileLeafRef instead of FileRef, etc. but none were successful.
Upvotes: 0
Views: 1896
Reputation: 233
With minor changes I solved problem. Instead of FileRef I put FileDirRef. For View I added Scope="RecursiveAll" and for Value I put relative address.
<Where>
<Eq>
<FieldRef Name="FileDirRef"/>
<Value Type='Text'>/sites/sitename/subsitename/DocLibraryName/folderName/SubFolderName</Value>
</Eq>
</Where>
Upvotes: 2