Tag Filter in Platform Analytics

nmsmtys_
Tera Contributor

Hi all,

has anyone been able to implement a Tag filter in Platform Analytics specifically?

Since tags & their mappings are stored in different tables (label, label_entry), and the tagged record (e.g. an incident) doesn't have a direct reference to these tables, we implemented this functionality via dynamic content blocks in Core UI. However, they are not compatible with Platform Analytics.

Based on the official communication by ServiceNow (for example here, Q50: Platform Analytics Academy - November 13th, 2024 -... - ServiceNow Community) , the recommended alternative to dynamic content blocks is creating a technical dashboard. Unfortunately, I've been unable to implement a similar functionality in UI Builder.

 

In this example, let's imagine I want to filter a single score data visualization with the tags Tag1, Tag2 and Tag3.

I added a Filter & the Data Visualization component to the technical dashboard.

The filter source is obviously the Tag [label] table, with a filter condition to only display Tag1, Tag and Tag3.

The data to filter is already problematic. According to the official documentation (Now Component Library | ServiceNow Developers), "Only that table or reference fields that point to that table can work as additional targets. The filter does not apply to any other targets you set." This means that the filter cannot be applied to the data visualization, because the Incident table (the data source of the data visualization) doesn't have a direct reference to the Tag or Label Entry table, and the Label Entry also doesn't have a reference to the Incident table, because the 'reference' is stored in the Table key field, which is a simple string with the sys ID of the record the tag belongs to.

My next idea was to attach an event handler to the Filter component, query the Label Entry table with the selected label IDs, and retrieve a list of Incident Sys IDs which then could be used in the filter condition of the data visualization via dynamic data binding. There are two problems with this:
1. It is not possible to retrieve the selected choices from the Filter component (at least I couldn't find how to do it)

2. The data source filter condition cannot be set directly via dynamic data binding, because you need to navigate to a different page to set it, and only static options are available there.

 

So at this point, I gave up. Has anyone had any success in implementing such functionality in UI Builder? Thank you in advance.

1 REPLY 1

KB
Tera Contributor

I also have this issue with tags etc on the new visuals. The only way I can get tag info from reports is by using a simple list with the tag field and then exporting to excel to then do group bys etc. It seems that there is something fundamental missing from the code with the tag field compared to other fields, since can only use "is" as a filter variable on them.