Hide List Content

A SharePoint Online tutorial by Peter Kalmström

SharePoint iconUsers often appreciate if list content that is irrelevant to them is hidden from view. Content can be hidden from the current user in several ways, and in the demo below Peter Kalmström, CEO and Systems Designer of kalmstrom.com Business Solutions, shows three ways to hide content and only display items to a user if they are relevant to that user.

As an example Peter uses a phone messages list. We have several demos on how to enhance a SharePoint Phone Messages list in this series, but here Peter is using a very simple list to just show the different methods to hide content.

Hide with a view

The view method can be used by everyone who has edit permission over the list. It is based on a filtered view, and it is just for convenience. This method to hide content does not prevent users from seeing the content if they really want to.
  1. Modify the default view (and any other view).
  2. Filter the "Called" column so that items are shown only when 'Called' is equal to the current user, [Me].

Hide with permissions

The other two methods are based on permissions, so they are secure. They can only be used by a site collection owner or admin. Owners will not be able to see items they have removed their own permissions from, but administrators will still see all items.

To set permissions on items manually is tedious and time consuming, but Peter shows how to do it to give an understanding of the process he then automates with a SharePoint 2010 workflow.

Manual permission setting on each item

  1. Click on the ellipsis for the item you want to set permission on and select 'Share'.
  2. Click 'Shared with' and then 'ADVANCED'.
  3. Click on the 'Stop Inheriting Permissions' button in the ribbon.
  4. Select all the existing permission groups and click on the 'Remove User Permissions' button in the ribbon.
  5. Click on the 'Grant Permissions' button in the ribbon and start writing the name of the person who should have permission on this item. Select the correct suggestion.
  6. Click on 'Share'.
By default users have 'Edit' permissions when given a unique item permission this way.

Workflow that sets permission on each new and changed item

  1. Open the site with the Phone Messages list i SharePoint Designer.
  2. Go to 'Lists and Libraries' and open the Phone Messages list.
  3. Create a List Workflow and give it a name. Note that it must be a SharePoint 2010 workflow. Permissions cannot be set with a SharePoint 2013 workflow.
  4. Go into the workflow properties and set the workflow to run automatically when an item is created or changed.
  5. Edit the workflow and insert an Impersonation Step. (These steps always run as the author, who in this case is allowed to change permissions on list items.)
  6. Click on the 'Actions' button and select 'Replace List Item Permissions'.
  7. In the step, click on 'these permissions'.
  8. Click on 'Add'.
  9. Click on 'Choose...' and replace all the permissions with a 'Workflow Lookup for a User...'.
  10. Click on 'Add'.
  11. At 'Field from source', select 'Called'.
  12. Click OK twice and then check the box for 'Edit'. Click OK.
  13. Click on 'this list' in the step and select 'Current Item'.
  14. Right click on the default first step and delete it.
  15. Publish the workflow
  16. Check the workflow by changing an item and then see under 'Shared'if the permission on that item has been changed too.





Learn more


---------------------------------------------------------------------------------------






Always the latest news in the kalmstrom.com blog



Follow kalmstrom.com on LinkedIn Facebook , Google+  or Twitter !

back icon next icon