Why is the Tag Encoded Query Different from a Regular Reference Field in ServiceNow?

nagaraju15
Tera Contributor

 

I've noticed that the encoded query for tags in ServiceNow is different from the syntax used for regular reference fields. For example, in a regular reference field like assigned-to, the query is assigned-to = sysID, but for tags, it uses

sys-tags.(sysID) = sysID.

 

Could someone explain why the encoding for tags differs from regular reference fields? And How it will be executed in the backend ?

5 REPLIES 5

Bert_c1
Kilo Patron

In my instance, tag values are stored in the 'label' table, and instances of those used on other records are stored in the 'label_entry' table. Look at those table definitions to get an understanding of how they are related to records in the instance.  Use a query on sys_db_object table: "GOTOnameSTARTSWITHlabel"