Security for a list based on a column value in the list

Copper Contributor

I have a list that users add an item and enter a department.  I am needing for security to be where if the user is part of that department they can see and edit the item but no other departments.

 

I have created a workflow that runs and sets security on the current item, however they cannot go to a list and see all for that department , says they do not have access.  When I look at the item and who it is shared to they have access.

 

I need when they go to the list that only the department they have access to shows and they can see those items but no others.

5 Replies
If it’s a modern experience, I would suggest to use powerapps to build the edit form and query the data based on users department. In case of classic view, we can use a user filter webpart to filter the records based on users department.

@Nitesh Ranjan 

Thank you I am not sure what Power Apps is .  this would be classic view.

For the filter, not sure how to set it up based on the department.  I dont want a filter for each department.  What would you suggest?

 

@Dford610 You can edit page and add a web part named current user filter. Establish the connection between filter web-part and list view. Edit the user filter web-part and and in properties you would see option to specify user department value (attached screenshot).

 

Please refer below URL to add a filter web part to a classic page and establish connection.

 

https://support.office.com/en-us/article/connect-a-filter-web-part-to-a-list-view-web-part-on-a-clas...

@Nitesh Ranjan 

thank you I will give this a try.  

 

I got this set up and it pulls the users department from Sharepoint/Active Directory. however I have some users that need access to more than one Department. Example I have a user that in Sharepoint their department is Home Health but in my list with the choices of Departments there is Home Health Paris, Home Health Mattoon/Charleston. they need to able to see both of those departments. I have tried to create a security group for the department but not sure that will work either.