CAML query to filter List items on the basis of Current User group in sharepoint online classic

%3CLINGO-SUB%20id%3D%22lingo-sub-1414378%22%20slang%3D%22en-US%22%3ECAML%20query%20to%20filter%20List%20items%20on%20the%20basis%20of%20Current%20User%20group%20in%20sharepoint%20online%20classic%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1414378%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20List%20library%20which%20having%20column%20Name-Vendor%2C%20also%20I%20have%20differ%20sharepoint%20user%20groups%20for%20each%20vendor.%3C%2FP%3E%3CP%3EI%20am%20using%20CAML%20query%20to%20filter%20List%20items%2C%20so%20user%20can%20see%20list%20items%20belong%20to%20its%20vendor%20group%20only.%3C%2FP%3E%3CP%3EI%20am%20filtering%20List%20items%20using%20CAML%20query%26nbsp%3B%20where%20value%20of%20currentuser%20group%20will%20be%20same%20as%20Value%20in%20Column%20of%20list%20items-Vendor%3C%2FP%3E%3CP%3EI%20am%20using%20following%20CAML%20query%2C%20is%20this%20correct%2C%20I%20am%20not%20getting%20expected%20filter%20result.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CAND%3E%3CMEMBERSHIP%20type%3D%22%26quot%3BCurrentUserGroups%26quot%3B%22%3E%3CFIELDREF%20name%3D%22%26quot%3BVendor%26quot%3B%2F%22%3E%3C%2FFIELDREF%3E%3C%2FMEMBERSHIP%3E%3C%2FAND%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1414378%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ELists%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
Contributor

I have List library which having column Name-Vendor, also I have differ sharepoint user groups for each vendor.

I am using CAML query to filter List items, so user can see list items belong to its vendor group only.

I am filtering List items using CAML query  where value of currentuser group will be same as Value in Column of list items-Vendor

I am using following CAML query, is this correct, I am not getting expected filter result.

 

<And><Membership Type="CurrentUserGroups"><FieldRef Name="Vendor"/></Membership></And>

0 Replies