Share The Wealth: Overview of Performance Analytics Interactive Filters in ServiceNow
all right today we're going to be discussing interactive filters how they can and how they can be used on the platform first like they have a basic overview on dashboards reports and interactive filters then we'll go in a little more detail on the different types of standard filters that you can create how to create them and their limitations and then we'll do a walkthrough on creating a report and interactive filters in the developer instance and then I'll show you some standard and custom interactive filters that I've created then we can look at some of the code behind them so dashboards allow you to display multiple performance analytics reporting and other widgets on a single screen this can give you a representation of what's going on in your organization interactive filters allow you to filter report widgets directly from a home page or a dashboard without modifying the actual report you do need a license for performance analytics to create new interactive filters so ServiceNow offers seven seven different types of filters that you can create the selection is limited so if there are other field types that you want to use to fill drawing then you would need to create your own custom filters but for the standard ones you have choice reference state and boolean field types you can also create group filters to display multiple interactive filters in a single widget you can filter based on whether a field contains a value or not and then you can also create cascading filters that allow you to filter based on multiple values and a hierarchy the UI control type gives you the options for displaying the filter so you can display them as radio buttons checkboxes or single input or multiple employee choice lists if you go to the interactive filter table you can actually create a new record and select what kind of filter you would like to create the name field is the name that will appear on the widget on the dashboard and then you can also use the lookup name to help organize or distinguish similar filters from one another then you can select the UI control type and then you also have some optional checkboxes that determine which tables the filter could potentially apply to if it's either a database or a hierarchy table structure and then for this example we're doing a choice list so you'd go and select the table incident and then the state field that we wanted to filter on and then you also have optional exclusion and default values so you can add any element that you want to exclude from the filter or a default value the excluded values are included when you select all as the filters type so unless you've already filtered your original report to exclude those records they will show up when the user selects all and then the default value is automatically applied for all users however if a user selects a different value that value is actually saved and and overrides that global default until they go in and clear the filter themselves so that's how the previous filter is displayed on any dashboard so you have the default value is new and then the records below are shown only the ones in the new state in order for a report to be filtered on the interactive filter the widget needs to have the follow interactive filter selected for it to apply well you can also make reports act as filters themselves so certain reports and breakdowns can act as interactive filters for other reports so for example a part a pie chart when you click on a subset of data and not report all other reports with the same table get filtered with that subset of data and I'll show you that when we get into the instance and for a report to act as an interactive filter you have to select act as an entry to filter on that report widget so custom filters are a fallback to use when standard filters don't provide you certain functionality you can create scripted filters to provide advanced filtering options and then you control all aspects of that filter interface and filtering logic custom filters are scripted widgets or dynamic content blocks that use the dashboard message tangela class to define and publish report filters so this is the dashboard message handler class you can accentuate the dashboard Nestor's handler with a unique value and then you can pass the table name and the query as parameters in the method and then you also have remove filter which would remove the filter the query from that particular filter for debugging you have a debug filter which displays a JSON array of all the active filters on your dashboard so for this example you can see the two active filters on the dashboard so you have one showing priority and another showing you can two buttons with either all tasks or only mine and in the debug you can see the ID table and filter for each one so there are a bunch of limitations listed in the ServiceNow documentation you can't select a default value I'm like you can for the standard out of box ones when you refresh a widget the filter value doesn't persist and then also when you select reset filter from the context menu it doesn't reset custom filters so your filters will still apply the custom filter values don't persist a crosstab so if your dashboard has multiple tabs it'll only work on that single tab and if there's more than one instance of that same filter on your page you could have some unexpected behavior you can also if you delete the filter the - board will then continue to follow that filter until you leave or refresh that page you can only select one table at a time - for the filter when exporting data to a PDF some of the content may appear blank or not respect the filter I haven't seen this but it is listed in the documentation as a limitation a big limitation to remember is filters do not apply to lazy loaded Dashboard widgets so filters only apply to widgets that are loaded on the screen so if you have longer dashboards they may not be filtered until the user Scrolls down and actually loads them and then apply the filter and then custom filters are not used in breakdown dashboards [Music]
https://www.youtube.com/watch?v=3Zi8wqw3pNk