How to use Cascading Interactive Filter to filter multiple record types within the same table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2025 02:54 PM
Hi All,
BACKGROUND
We're trying to create an interactive filter that allows us to filter reports we have for GRC record types (Issues, Controls, Risks etc) based on the organisational structured Entities that those records belong too.
Our organisational structure, and the associated ServiceNow tables we are using to store our org structure data, is as follows:
- Company [core_company]
- Division [business_unit]
- Sub-Division [cmn_department]
- Team [cmn_department]
Note - Both 'Sub-Divisions' and 'Teams' reside within the Department table [cmn_department], and we have a custom Choice field named "Type" that allows us to identify which records are 'Sub-Divisions', and which are 'Teams'.
On our Entity records [sn_grc_profile] we have two fields that we are looking to filter our GRC record type (Issues, Controls, Risks etc) reports on:
- Business Unit - This is a reference to the Business Unit table [business_unit], and stores the Division data.
- Department - This is a reference to the Department table [cmn_department], and stores the Sub-Division OR Team data.
In order to filter our reports, I've tried creating a Cascading Interactive Filter with the following levels:
> Business Unit - Division
> Department - Sub-Division
> Department - Team
As seen here:
ISSUE
However, we encounter an issue when trying to use all three levels of the filter. This is because levels 2 (Department - Sub-Division) and level 3 (Department - Team) are both references to records on the Department table [cmn_department]. So when a selection is made on all three levels, the resulting filter is querying the reports with two conditions for the same field, which of course returns no results.
EXAMPLE
For example, if the following selection is made on the Cascading Filter:
Business Unit - Division [business_unit] = Technology
Department - Sub-Division [cmn_department] = Customer Support
Department - Team [cmn_department] = Service Desk
This results in the query:
"record.entity.business_unit=Technology" AND
"record.entity.cmn_department=Customer Support" AND
"record.entity.cmn_department=Service Desk"
...which as you can see, both levels 2 (Department - Sub-Division) and level 3 (Department - Team) are querying the Department field of the Entity that our record falls under. Therefore we end up with 0 results on our reports when using this filter.
Note - Filtering using only level 1 (Business Unit - Division) and level 2 (Department - Sub-Division) works fine,
QUESTIONS
Is this a limitation of Cascading Filters?
Has anybody else encountered this before?
Is there another way to create a 'Cascading-like' filter that allows you to filter the same field on a record twice, but in different ways?
Appreciate any advice out there.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2025 05:50 PM
Hi @DanvW ,
There is no limitation as such, you need to use the conditions properly.
what you can do in your case is :
"record.entity.business_unit=Technology" AND
"record.entity.cmn_department=Customer Support" OR
"record.entity.cmn_department=Service Desk"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2025 06:05 PM - edited 02-12-2025 06:06 PM
Hi Sandeep, thank you for your response.
Correct, I could do that if I were manually selecting/creating those conditions on a filter within a list view. However, the query/conditions that I have outlined is what the Interactive Filter generates.
For example:
- I add my Cascading Interactive Filter to a dashboard.
- I ensure the Interactive Filter is set to target the tables that I am reporting/have reports for on that dashboard.
- I ensure the Reports are set to "Follow Interactive Filters".
- I now make a selection from each of the 3 drop downs on my Cascading Filter, and click "Apply".
- The Reports are getting filtered by the condition that that Cascading Filter generates, and now show zero results because the filter being applied includes:
"record.entity.cmn_department=Customer Support" AND
"record.entity.cmn_department=Service Desk"
So what I'm trying to understand is whether there is a way to have the Cascading Filter output the filter query with an "OR" condition as you have mentioned, instead of the "AND" condition that it currently does OOTB.
Kind regards,
Dan vW