Sometimes, you need a way to organize data within ServiceNow without adding a new field to a table. It’s not the optimal solution for exporting data to an external database (the third-party DB may not support it). ServiceNow Tags are a great tactical solution for a quick win. If you work with tags from a List view, you'll notice a limitation of the UI. At face value, there is no operator for a Tags condition, and after clicking "Run," the resulting query will contain an inclusive "has" condition, which is represented as "%253D" in the URL. Not having a way to query for CIs that DO NOT have the assigned tag is annoying. However, there is an undocumented workaround.
Ok, here's the pro tip that will allow you to work around this UI limitation. Merely replace the "%253D" value in the URL between the tag sys_id with "EXCLUDING" and then execute the URL again. The query will work, however, there are some limitations you will have to work with.
The good news is that you can see the condition in the filter breadcrumb. So copying the encoded query from the context (right-click) menu works as expected
If you are curious, here's the story behind this pro tip. . .While the list view has the tag condition limitation, Report Builder (and Query Builder) does not. Go ahead and try it. Create a report with the tag condition, and you will see three operators!
Save your report and then look at the filter parameter of the report's xml (sys_report). Search for “filter,” and you can see the encoded query with the tag condition.
Interested to learn more? Reach out to us at chat@rapdev.io