If you store data in your sharepoint lists which should only be accessible by specified users you can use the item permissions. But if you have to do it manually for each item, your endusers won’t be amused. So i’d like to share a possiblity how you can do it automatically. Your enduser only has to fill a field which person should have (in my example Read) permissions on this item.
Workflow to set permissions based on input
It is an easy small example which you can use as basic for further enhancements.
Here is the example:
Image may be NSFW.
Clik here to view.
Your enduser inserts the data and set the person sales and me to read access. In the normal way the security for the item looks like this:
Image may be NSFW.
Clik here to view.
But after my workflow finished it will look like this:
Image may be NSFW.
Clik here to view.
As you can see me and Mr. Sales were added with Read permissions and the item has unique permissions. That’s looks really easy for your enduser and in the next steps i’ll show you that it is also easy for you.
Step 1: Create a workflow for your list – in my example it’s Sales Data
Image may be NSFW.
Clik here to view.
Then we add a name and a description (or not)
Image may be NSFW.
Clik here to view.
Step 2: Add an Impersonation Step and delete the default one
First add a new step called Impersonation step, then delete the old one. That’s because the enduser may not have permissions to change the permissions. In that case the step is running with credentials from the author of the workflow.
Image may be NSFW.
Clik here to view.
Step 3: Add Action “Add List Item Permissions”
Image may be NSFW.
Clik here to view.
Step 4: Configure the permissions:
Set the item as current item and the add permissions.
Image may be NSFW.
Clik here to view.
Click on add.
Image may be NSFW.
Clik here to view.
Use Workflow Lookup for a User… there you can choose from which field it should look up the username.
Image may be NSFW.
Clik here to view.
The usernames come from this item of the field Read Access. Important here is to return the field as “As String”!
Image may be NSFW.
Clik here to view.
Step 5: Publish and Test
Image may be NSFW.
Clik here to view.
After publishing you can start the workflow on your item and see the results.
Image may be NSFW.
Clik here to view.
After your workflow finished you should get the same result as the screens at the top of this post. It makes sense to let the workflow start automatically.
Extra Tip
If it also starts if item is changed, maybe you have to insert the step “Inherit parent permissions”. This trick helps if someone changed the user in the field. With inherit parent permissions it will be set like it was at creation time, after that it will set the new permissions.
Hope you like it.
..:: I LIKE SHAREPOINT ::..