There is a requirement where the users should be allowed to view only the requests raised by them and a particular SharePoint group members should be able to view all the items.
We can achieve it using Rest API but a much simpler approach would be to make use of the OOTB features.
1. Please create a view with filter "Created By" is equal to [Me] and make it as the default view.
2. Now navigate to the list view page. Edit Page. Edit web part and check the option "Disable view selector menu" and save the webpart. This would prevent users from selecting the view. In simple words, the user would be able to see only the list items and not the view tab.
Now, how to make all items view visible to the members of a SharePoint group.
Please go to the navigation settings and create a link to navigate to the all items view.
Set target audience to the particular SharePoint group.
Its done! :)
We can achieve it using Rest API but a much simpler approach would be to make use of the OOTB features.
1. Please create a view with filter "Created By" is equal to [Me] and make it as the default view.
2. Now navigate to the list view page. Edit Page. Edit web part and check the option "Disable view selector menu" and save the webpart. This would prevent users from selecting the view. In simple words, the user would be able to see only the list items and not the view tab.
Now, how to make all items view visible to the members of a SharePoint group.
Please go to the navigation settings and create a link to navigate to the all items view.
Set target audience to the particular SharePoint group.
Its done! :)
Comments
Post a Comment