문제

I have multiple lists with the same custom Person or Group column CurrentReviewer (single selection) which will always contain a SPGroup.

I have set up a SPSiteDataQuery but I'm missing the last piece of the puzzle in my CAML and that is to identify the groups that the current user is part of.

How can I, using CAML query, find all the rows in a list where a group the current user is a member of appears in the column CurrentReviewer?

도움이 되었습니까?

해결책

You can use Membership element:

<Or>
  <Membership Type=\"CurrentUserGroups\">
    <FieldRef Name=\"AssignedTo\"/>
  </Membership>
  <Eq>
    <FieldRef Name=\"CurrentReviewer\"></FieldRef>
    <Value Type=\"Integer\">
      <UserID/>
    </Value>
  </Eq>
</Or>

http://msdn.microsoft.com/en-us/library/office/aa544234(v=office.15).aspx

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top