In this article, we will explain How to group by Content Type in SharePoint 2016 and 2013 and SharePoint online.
You might also like to read DataView is disabled in SharePoint Designer 2013
- In SharePoint 2016, I have a SharePoint list with two Content Types
- Item and
- Announcement,
So that, I need to display this SharePoint List view grouped by the Content Type field as shown below:
So I thought I can modify the view and at Group by section I can group by Content Type field name!
Unfortunately, I had noticed that there is no field called Content Type in Group By section as shown below.
As we earlier mentioned, you can’t find Content Type field in the Group By section when modifying the list view. However, you can Group By Content Type in SharePoint by modifying the list view using SharePoint Designer as the following:
Steps
- Modify your view > In the Group by section, > select any field like Title.
- Open SharePoint Designer > From the left menue > Select List & Library > Click on your List .
- In View Section, Right Click on your view and select “Edit file in Advanced Mode”.
- Search for a <view> tag.
- Scroll horizontally till get the <GroupBy> tag as shown below.
- In <GroupBy> tag, Change the Name value to ContentType.
- Save.
- Open your view, your list view should be now grouped by Content Type.
Conclusion
In SharePoint list view, when modifying a list to group by a specific field, you will note that the content type field is not listed, so that here, we have provided a quick workaround to group by content type in SharePoint Online and SharePoint 2016 / 2013.
Applies To
- SharePoint 2016.
- SharePoint 2013.
- SharePoint 2010.
- SharePoint Online.
See Also
Another neat trick to do this without Sharepoint Designer is to by using Inspect Element.
Change any previous option value to “tp_ContentType” and select it, then press OK.
Done!
Another neat trick to do this without Sharepoint Designer is to by using Inspect Element.
Change any previous option value to “tp_ContentType” and select it, then press OK.
Done!
Good hint 🙂
yes
This is great thanks 🙂
One issue I have is on load it groups it by content type ID rather then content type in O365.
If you click the content type then go back to the list it groups by content type.
Anyone else having this issue?
We had this issue as well. If you click on the content type ID in the group by header and then go back, then it lists the content type instead of the ID. Then, if you ‘Save View As’ and give it a new name, the new view will come up with the content type instead of the ID.
Hello,
I followed these instructions, but when I do this it displays the Content Type ID, not the name. Ex. Content Type: 0x010 etc….
How can I get it to display the actual content type name?