I have a Library which hosts my document sets. As we all know, each document set actually creates a sub-folder, within the Library. So, now I have a structure similar to:
Root
\___ Doc Set 1 (ID = 1)
\________ Doc 1.docx
\________ Doc 2.docx
\___ Doc Set 2 (ID = 4)
\________ Doc 3.docx
\________ Doc 4.docx
I want to use an OOB XsltListViewWebPart to show the documents of a document set specified by its ID, on a page of mine. I have provisioned a custom view, which has a Scope=Recursive, which returns all the files of the library as a flat list. Now I just need to somehow filter the view by document set ID.
Unfortunately, seems like SharePoint doesn't support a token such as 'RootFolderId', there is just 'RootFolder' which is a server-relative path of the folder. But I only have ID (int) of the document set.
Question: What can I possibly use in the View's Query, in order to filter and return only the documents which are under the folder, specified by the folder int ID? Is there a way I can say in the CAML query: 'give me all files, where FileDirRef == (folder where ID = {ID}).FileLeafRef?
Alternatively, how can I configure the doc lib / document set content type, to propagate the document set ID to the documents which are under the document set? I can't believe there is no single way of correlating the documents under the doc set, to their parent, by iD.
I am well familiar with the ParameterBinding tag, however the most promising configurations of this tag (i.e. 'Form' and 'Control') only work on post-back.