0

I am working on an office 365 online SharePoint site collection. I have added a custom list inside my site collection. The site collection has the built-in group named "Owner", so is there a way inside my create and edit list forms to show/hide certain column, based on if the user is inside the "Owner" group or not?

So let's say I have a field named "Issue Status", then if the user who is editing or creating the item is inside the Owner group, the "Issue Status" will be shown, otherwise the "Issue status" will be hidden?

Will I be able to achieve these inside both the classic & modern interface for my create and edit forms?

Thanks.

1

I don't think you can easily restrict view access to specific metadata columns.

Short Answer: Use a Page with embedded library web-parts, custom views and Audience Targeting.

For Forms: Use the same principle (audience targeting) to provide links for custom forms.

Long Answer:

Instead of accessing the library directly (I would make the 'Issue Status' column hidden in the default view), the users can access the page with the library embedded instead. You could then either make different pages based on group (with different permissions for each page, or use Audience Targeting (which I recommend, but I can't confirm that it will work with the modern UI).

Essentially, create a New Page and embed the library in a webpart twice. Then set webpart 1 to the 'Owners' view, and set the audience targeting (in the webpart settings) to only display to owners, then for webpart 2 set the view to 'Users' and change the audience targeting settings to users only.

Only the library which is targeting them should be displayed with it's respective view (so one library will be hidden at a time).

You can repeat this process with embedded hyperlinks as webparts which will link to custom forms, but I think custom forms is a more complex subject than I should explain here, so I'll just link to reference.

https://support.office.com/en-us/article/create-a-custom-list-form-using-sharepoint-designer-917d8fdb-ee00-4441-adb3-a94612d1d105

  • thanks for the reply, but what about following this approach sharepointdiary.com/2013/07/… will this approach work for SP online and for the classic & modern interfaces? – Peter A Jan 26 '18 at 11:41
  • It's not an OOTB solution but it should work. Try it and let the community know if it worked. – J. Doe Jan 26 '18 at 11:55
1

You could use SPServices to check whether the current user is member of a particular group, and using jQuery to hide the field if the current user has no permission.

Check the article: Hide SharePoint List Columns based on User Permissions

  • thanks for the link, but will this approach work for SP online and for the classic & modern interfaces? – Peter A Jan 26 '18 at 11:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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