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

My project consists of two lists:

  • a list of documents. This list has an SPUser field that determines who is responsible for that document.
  • a list of projects. This list has a multiple lookup to the documents (among other things).

The goal is to create a view on the projects list that shows only those projects that contain documents for which the current user is responsible. I'm having a very hard time finding examples of such things online. Here's what I have so far.

<Query>
    <Where>
        <Contains>
            <FieldRef Name="PROJ_Documents" />
            ???? //not sure what to put here
                <Where>
                    <Eq>
                        <FieldRef Name="DOC_Responsible" />
                        <Value Type="Text">
                            <UserID/>
                        </Value>
                    </Eq>
                </Where>
        </Contains>   
    </where>
</Query>
share|improve this question
add comment

3 Answers 3

<Query> <Where> <Eq> <FieldRef Name="DOC_Responsible" /> <Value Type="Integer"> <UserID Type="Integer"/> </Value> </Eq> </Where> </Query>

share|improve this answer
add comment

If I understand correctly, what you want to use is a Join.

share|improve this answer
add comment

http://spboom.com/sharepoint-development/sharepoint-caml-queries-samples/

http://spcamlqueryhelper.codeplex.com/

Check this links here you can find solution, base on your condition using tool or Query.

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.