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

%3CLINGO-SUB%20id%3D%22lingo-sub-671158%22%20slang%3D%22en-US%22%3ESecurity%20for%20a%20list%20based%20on%20a%20column%20value%20in%20the%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-671158%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20list%20that%20users%20add%20an%20item%20and%20enter%20a%20department.%26nbsp%3B%20I%20am%20needing%20for%20security%20to%20be%20where%20if%20the%20user%20is%20part%20of%20that%20department%20they%20can%20see%20and%20edit%20the%20item%20but%20no%20other%20departments.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20created%20a%20workflow%20that%20runs%20and%20sets%20security%20on%20the%20current%20item%2C%20however%20they%20cannot%20go%20to%20a%20list%20and%20see%20all%20for%20that%20department%20%2C%20says%20they%20do%20not%20have%20access.%26nbsp%3B%20When%20I%20look%20at%20the%20item%20and%20who%20it%20is%20shared%20to%20they%20have%20access.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20need%20when%20they%20go%20to%20the%20list%20that%20only%20the%20department%20they%20have%20access%20to%20shows%20and%20they%20can%20see%20those%20items%20but%20no%20others.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-671158%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3E2013%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ELists%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPermissions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESecurity%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-671201%22%20slang%3D%22en-US%22%3ERe%3A%20Security%20for%20a%20list%20based%20on%20a%20column%20value%20in%20the%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-671201%22%20slang%3D%22en-US%22%3EIf%20it%E2%80%99s%20a%20modern%20experience%2C%20I%20would%20suggest%20to%20use%20powerapps%20to%20build%20the%20edit%20form%20and%20query%20the%20data%20based%20on%20users%20department.%20In%20case%20of%20classic%20view%2C%20we%20can%20use%20a%20user%20filter%20webpart%20to%20filter%20the%20records%20based%20on%20users%20department.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-671371%22%20slang%3D%22en-US%22%3ERe%3A%20Security%20for%20a%20list%20based%20on%20a%20column%20value%20in%20the%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-671371%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F147286%22%20target%3D%22_blank%22%3E%40Nitesh%20Ranjan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20I%20am%20not%20sure%20what%20Power%20Apps%20is%20.%26nbsp%3B%20this%20would%20be%20classic%20view.%3C%2FP%3E%3CP%3EFor%20the%20filter%2C%20not%20sure%20how%20to%20set%20it%20up%20based%20on%20the%20department.%26nbsp%3B%20I%20dont%20want%20a%20filter%20for%20each%20department.%26nbsp%3B%20What%20would%20you%20suggest%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-672087%22%20slang%3D%22en-US%22%3ERe%3A%20Security%20for%20a%20list%20based%20on%20a%20column%20value%20in%20the%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-672087%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F355116%22%20target%3D%22_blank%22%3E%40Dford610%3C%2FA%3E%26nbsp%3BYou%20can%20edit%20page%20and%20add%20a%20web%20part%20named%20current%20user%20filter.%20Establish%20the%20connection%20between%20filter%20web-part%20and%20list%20view.%20Edit%20the%20user%20filter%20web-part%20and%20and%20in%20properties%20you%20would%20see%20option%20to%20specify%20user%20department%20value%20(attached%20screenshot).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20refer%20below%20URL%20to%20add%20a%20filter%20web%20part%20to%20a%20classic%20page%20and%20establish%20connection.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2Fconnect-a-filter-web-part-to-a-list-view-web-part-on-a-classic-page-4f3f6c10-0a1b-479d-8b4d-c4f1bf49bb3f%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2Fconnect-a-filter-web-part-to-a-list-view-web-part-on-a-classic-page-4f3f6c10-0a1b-479d-8b4d-c4f1bf49bb3f%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-672347%22%20slang%3D%22en-US%22%3ERe%3A%20Security%20for%20a%20list%20based%20on%20a%20column%20value%20in%20the%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-672347%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F147286%22%20target%3D%22_blank%22%3E%40Nitesh%20Ranjan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethank%20you%20I%20will%20give%20this%20a%20try.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-674727%22%20slang%3D%22en-US%22%3ERe%3A%20Security%20for%20a%20list%20based%20on%20a%20column%20value%20in%20the%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-674727%22%20slang%3D%22en-US%22%3EI%20got%20this%20set%20up%20and%20it%20pulls%20the%20users%20department%20from%20Sharepoint%2FActive%20Directory.%20however%20I%20have%20some%20users%20that%20need%20access%20to%20more%20than%20one%20Department.%20Example%20I%20have%20a%20user%20that%20in%20Sharepoint%20their%20department%20is%20Home%20Health%20but%20in%20my%20list%20with%20the%20choices%20of%20Departments%20there%20is%20Home%20Health%20Paris%2C%20Home%20Health%20Mattoon%2FCharleston.%20they%20need%20to%20able%20to%20see%20both%20of%20those%20departments.%20I%20have%20tried%20to%20create%20a%20security%20group%20for%20the%20department%20but%20not%20sure%20that%20will%20work%20either.%3C%2FLINGO-BODY%3E
Highlighted
New 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
Highlighted
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.
Highlighted

@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?

 

Highlighted

@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...

Highlighted

@Nitesh Ranjan 

thank you I will give this a try.  

 

Highlighted
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.