Monday, 15 April 2013

Filtering list information by SharePoint group in Sharepoint 2010

My current project requires that data be filtered based on the credentials of the current user.

The solution - a little magic in the view definition.

In a view, you can specify the following in the 'where' clause of the CAML:

<Membership Type="CurrentUserGroups">              
 <FieldRef Name="MyColumnToFilterData" />

The only requirement is that the column my be of type 'Person or Group'.

See here for more information.