May 25 2020 01:01 AM
I have List which having column name Vendor and I want to filter list one the basis of Vendor name
I am using CAML query and its working fine if I am passing hardcoded value
<Where><Eq><FieldRef Name='Vendor' /><Value Type='Text'>'IBM'</Value></Eq></Where>
Now I want to make it dynamic, instead of Hardcode Value 'IBM' , I want to fetch this value from current user sharepoint group, so If current users group is 'IBM' , he only shee list items where column vendor value='IBM'
if current users group is 'Microsoft' he can only see list items having value in vendor column as 'Microsoft'
how can I make above CAML query dynamic by passing current users group in query?
something called <Membership Type="CurrentUserGroups">, but I am not sure how to user that.