we have a document repository that has documents for multiple departments in one list. However I need to make it so the departments can only view there items. I have tried to filter view based on department, but it is not showing the results I want. In actuality it shows the same department no matter who you are.

  • Check out the posibilities of Document Sets (available since 2010) Jan 8, 2016 at 18:19

2 Answers 2

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

Here is something that you can try:

  1. Add a new column (example:"My Department") of type "Person or group" to the list.
  2. Create a SharePoint group for each department and set the department field in each item to a relevant Department sharepoint group.
  3. Then you can change the view query to show items based on if the user is a member of the Department group using the membership tag as shown at the top.

Assume you have 4 departments. Create 4 folders within your document library (one per department) and 4 SharePoint groups (one per department). Populate the groups with users appropriately, then assign permissions to the folders using the groups you created.

Set the default view to show a flat list of files (ignoring folders) and each user's default view will then be limited to only the files to which they have access -- the ones in their department's subfolder.

This will also let you support cross-functional users who belong to more than 1 department and thus need to see files from 2 or more.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.