List view to show item assigned to SharePoint group
Kintali Prasanti
Architect |Sharepoint|SPFX| React|Powerapps|Power Automate | PHA | BITSian
SharePoint out of box list view filter gives us an option to create a view that can show the list of items assigned to logged in user, but there is no filter option available to show items assigned to a group.
We can handle this type of scenario by setting the item level permissions, so that the users will be able to show the items/documents for which they have access, but we will be facing issues when the user needs access to update the item in a later point of time.
I am going to explain you a way how we can create these kinds of view using PnP PowerShell
领英推荐
CAML query :
<Where>
<Or>
<Membership Type=\"CurrentUserGroups\">
<FieldRef Name=\"AssignedToGroup\"/>
</Membership>
<Eq>
<FieldRef Name=\"AssignedToGroup\"></FieldRef>
<Value Type=\"Integer\">
<UserID/>
</Value>
</Eq>
</Or>
</Where>
With this approach we can create complex view. Further you can format the view using JSON list view formatting and show the content on a modern page by adding list view webpart. This way we can achieve complex views creation ,formation and displaying the records in a modern page without creating SPFx webpart or Power Apps forms.
Reference Links :