Forum Discussion
Filter hierarchical expression group
In SharePoint Online, hierarchical expression groups allow you to define a hierarchy of terms for tagging and categorizing documents and items. However, filtering by a parent term in the hierarchy does not automatically include items tagged with child terms. To achieve the behavior you described, where filtering by "school" also shows documents tagged with "primary school," you can follow these steps:
- Modify Your Managed Metadata Column:
Ensure that you have a Managed Metadata column in your SharePoint library that uses the hierarchical term set you described. If not, create one or modify your existing column.
- Update Your Document Metadata:
Go to your document library, select the documents, and update their metadata. Make sure that you select the appropriate terms from the hierarchical term set, such as "primary school" for documents related to primary schools.
- Use SharePoint's Content Query Web Part (CQWP):
SharePoint provides a Content Query Web Part (CQWP) that allows you to display content from multiple lists or libraries based on specific criteria, including metadata. You can use this web part to create custom views that display documents tagged with child terms when you filter by a parent term.
- Edit the page where you want to display the documents.
- Add a Content Query Web Part.
- Configure the CQWP to query your document library and filter by the metadata column that corresponds to the hierarchical term set.
- Customize the CQWP to display the documents as you prefer.
- Create Custom Views:
Alternatively, you can create custom views in your document library that use the "Show items only when the following is true" option in the filter settings. You can specify conditions based on your metadata column to include child terms when filtering by parent terms. Here's an example:
- Create a new view in your document library.
- In the filter settings, set the condition to "Show items only when the following is true."
- Use the metadata column and specify a condition like "is equal to" and choose the parent term, such as "school."
- Save the view.
When you filter by "school" in this custom view, it should display documents tagged with both "school" and "primary school."
Please note that the exact steps may vary depending on your SharePoint configuration and version. Be sure to adapt these instructions to your specific SharePoint Online environment.
My knowledge of the topic is limited, but since no one has answered yet, even though it has been read many times, I posted the question in various AIs and found the above suggested solution for you. The proposed solution is untested.
My answers are voluntary and without guarantee!
Hope this will help you.
Was the answer useful? Mark as best response and Like it!
This will help all forum participants.
I can't create a custom view for every "parent" term.
Can anybody tell me, how to display the descendant term marked documents when choosing the parent term?