Tags - appears as a field but is not defined on the table

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-22-2022 02:06 AM
Tags is a column that we can add on pretty much all ServiceNow tables.
But few may be surprised to find it like me that it is not a field defined on the table where it is added in the list view.
I would like to know, if not defined as a column on a table - how does an entry on label.LIST gets into every other ServiceNow table? How does it work?
Regards,
Anish
- Labels:
-
Instance Configuration

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-23-2022 03:36 PM
Hi Anish,
Tags are basically stored under System Definitions -> Tags, they are basically new versions of what we previously called labels. When you define tags they are stored along with the relationship to target record, see below as an example. They can also be shared with different users.
When you go to reports you can also report on tags.
Table name: label
There are also related tables, main one is label_entry
You can review the documentation below.
Hope the above answers your query, if so please mark as helpful / correct.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-24-2022 02:07 AM
Hi Hardik,
Thanks. I get what you are saying above. Just one more clarification.
Where is this relationship (relationship to target record) maintained that you are speaking of?
I could understand Tags and the explanation given in the Product documentation, but what brought me to this thread is - how does it appear as a column in all the global tables?
Regards,
Anish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-24-2022 05:22 PM
Hi Anish,
Tags are saved in "label_entry" table.
Column "Table" is the name of the target name of the table with the tags. Column "Table key" is the sys_id of the record to add the tag in the target table. Column "Label" is the value of the tag.
That is, records in the label_entry points to where the tags in the target table.
For example, putting a tag in an incident record will add an entry in the label_entry table that points to the incident record. It's not the incident record that refers to the label_entry table but the other way around. This is why tags can be used in many tables without.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-24-2022 08:49 PM
Although I understand the logic, but just for a still further confirmation, is it configured in some script or somewhere else on the platform that adding a tag on a global tag - sits on the label_entry table. Where is that logic written or configured?
Regards,
Anish