Filtering List items on the basis of current user group

%3CLINGO-SUB%20id%3D%22lingo-sub-1417146%22%20slang%3D%22en-US%22%3EFiltering%20List%20items%20on%20the%20basis%20of%20current%20user%20group%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1417146%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20list%20which%20having%20column%20Vendor-%20which%20have%20values%20'IBM'%2C%20'Microsoft'%2C%20'Paypal'%3C%2FP%3E%3CP%3Efor%20each%20vendor%20i%20have%20SP%20user%20groups%26nbsp%3B%3C%2FP%3E%3CP%3EIBM_GRP%3C%2FP%3E%3CP%3EMicrosoft_GRP%3C%2FP%3E%3CP%3EPaypal_GRP%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ei%20want%20to%20filter%20list%20items%2Cso%20That%20each%20group%20members%20can%20only%20see%20list%20items%20having%20value%20of%20there%20group%20name%20in%20Vendor%20Column%3C%2FP%3E%3CP%3ESo%20IBM_Grp%20users%20can%20see%20only%20list%20items%20with%20value%20'IBM'%20in%20Column%20vendor%3C%2FP%3E%3CP%3EMicrosoft_Grp%20users%20can%20see%20only%20list%20items%20with%20value%20'Microsoft'%20in%20column%20vendor%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Elike%20this%2C%20how%20can%20we%20achieve%20this.%3C%2FP%3E%3CP%3EI%20tried%20to%20user%20CAML%20query%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CMEMBERSHIP%20type%3D%22%5C%26quot%3BCurrentUserGroups%5C%26quot%3B%22%3E%3CFIELDREF%20name%3D%22%5C%26quot%3BVendor%5C%26quot%3B%2F%22%3E%3C%2FFIELDREF%3E%3C%2FMEMBERSHIP%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20its%20not%20working%2C%20any%20better%20way%20to%20achieve%20this%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1417146%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
Contributor

I have list which having column Vendor- which have values 'IBM', 'Microsoft', 'Paypal'

for each vendor i have SP user groups 

IBM_GRP

Microsoft_GRP

Paypal_GRP

 

i want to filter list items,so That each group members can only see list items having value of there group name in Vendor Column

So IBM_Grp users can see only list items with value 'IBM' in Column vendor

Microsoft_Grp users can see only list items with value 'Microsoft' in column vendor

 

like this, how can we achieve this.

I tried to user CAML query,

 

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

 

But its not working, any better way to achieve this?

0 Replies