A ServiceNow tag is a text label you attach to a record or page so related items can be grouped and found again. You can add a tag from a form’s more options menu or from a list, filter a list by tag, and set a Viewable by level that decides who can see the tag.
What a tag does and where tags are kept
Each tag can be visible to any user, to specific groups or users, or to one person. Tags are stored in the Tag [label] table. Administrators open the full list from System Definition > Tags, and everyday users find their own tags under Self-Service > My Tags.
For tags used to govern cloud resources, which is a separate product, see tag governance for cloud resources.
Adding a tag to a record
From a form
Open the record, select the more options icon in the form header, and select Add Tag. Click in the Add Tag field, then select an existing tag or enter a new name. This route does not need a specific role.
From a list, one record or several
Personalize the list view so the Tags column is displayed, click in the Add Tag field on the row, and type an existing tag name or a new one. To tag several records at once, select their check boxes, open Actions on selected rows, and use the Assign tag listing. Selecting New there lets you name the tag, choose a sharing level and save it.
From the list context menu
Select and hold a record, or right-click it. Choose Assign Tag and then the tag’s name. For a new tag, choose Assign Tag, then New Tag, enter the name, choose a sharing level and select Save.
Naming rules
Tag names are case-insensitive and cannot contain punctuation. Billing Review and billing review therefore refer to the same tag.
Creating a tag and setting who can see it
Creating a tag from the Tags list requires the tags_admin role. Open All > System Definition > Tags or Self-Service > My Tags, select New, and enter a name. A tag then has four further settings: Owner, which can be transferred to another user; Type; Viewable by; and Active, which turns the tag on or off.
Sharing levels
The Viewable by setting controls who can use a tag. By default a tag is visible only to its creator.
| Sharing level | Who can see the tag |
|---|---|
| Me | The owner alone. This is the default. |
| Groups and Users | The owner plus the groups or users you specify. |
| Everyone | All users, as a global tag. Users with the tags_admin role can create a global tag shared with Everyone, and the admin role also has this option. |
When tag names clash
If a private tag has the same name as a shared or global tag, the system adds [private] to the end of the private tag’s name, so Sample tag becomes Sample tag [private]. Two shared or global tags cannot share a name. A duplicate is refused with an error message.
Tag types and the Tagged Documents page
A Standard tag is managed by the people who have access to it. The other four types are maintained by the system.
| Type | What the system keeps | Appears on Tagged Documents |
|---|---|---|
| Standard | Records added and removed by users with access | Yes |
| Most Active | Modules a person opens frequently | No |
| Most Recent | Modules a person opened recently | No |
| Most Active Record | Records a person views frequently | No |
| Most Recent Record | Records a person viewed recently | Yes |
The Tagged Documents page is at All > Self-Service > My Tagged Documents. It shows recently viewed documents and documents that carry user-applied tags. Select Show Global Tags to include global tags. In the sidebar, select Most Recent, or select a tag name to see the documents that carry it. Each preview has an x in its corner that removes the tag, and selecting the preview’s title opens the form.
Filtering records by tag
You can filter a table by any tag you have access to.
- From a form: select the more options icon, then the tag in the menu. A new tab or window lists the records that contain it.
- From the Tags column: show the column and select a tag name. Selecting two or more tags filters with the AND operator, so the results contain all of the selected tags.
- From the list filter: select the show or hide filter icon, choose Tags from the field list, and enter the tag name.
Tag conditions in reports
Conditions that use the Tags field are not supported in reports or in data visualizations built on database views.
Removing tags from records
Anyone who has been granted access to a tag can remove it from a record. In a list, select the remove tag icon, shown as an x, beside the tag name. For several records, select their check boxes, open Actions on selected rows, and choose Remove Tag, then the tag name. In a form, open the more options icon and select the remove tag icon. On the Tagged Documents page, select the x in the corner of the preview.
Editing and merging tags
Editing a tag’s name or sharing level updates all records that carry it. From a list, select the edit tag audience icon beside the tag name, change the Name or Viewable by value in the Tag Details dialog box, and select Save. From All > Self-Service > My Tags, open a tag, make the change and select Update.
Merging tags
Merging Tag A into Tag B deletes Tag A and reassigns its records to Tag B. To merge, go to All > Self-Service > My Tags, select the check box for each tag, select Actions on selected rows, then Merge Tags. Enter the target tag and select OK. Users with the admin or tags_admin role can merge any tag into any other tag. Other users can merge tags they created into tags that are visible to them.
Automatic tagging with conditions
Auto-assignment applies a tag to records that match the conditions defined on the tag, and removes it when a record no longer matches. Setting up auto-assignment requires the tags_admin role.
Dot-walked fields are not allowed
A tag cannot be auto-assigned when its condition includes a dot-walked field. Dot-walking builds a chain of field names separated by dots to reach a field on a referenced table. For example, incident.assigned_to.company reaches the company of the user assigned to an incident.
Setting up an automatic assignment
- Open the tag and add the Conditions for Labels embedded list to its form.
- Create a new row in that list.
- Click the reference icon in the Table column to open the Label Table list.
- Select New, enter a Name, select a Table, and add the conditions that decide which records receive the tag.
- Select Submit, select the check mark icon to save the row, and then select Update on the tag.
Access control rules for conditions
Creating conditions depends on access control rules for two tables, label_table and label_auto. Read, write and create are needed on both, and delete is optional. Each rule must include tags_admin as a required role. Creating these access control rules requires the security_admin elevated role.
Notifications when a tagged record changes
Notifications also require the tags_admin role. Open the tag, then open the record in the Label Entries related list. Select Notify onchange to be notified any time the record is modified. Use the Notify when condition builder to set the conditions that must be true, and pick a business rule in the Notify script field.
Making tags searchable with text indexing
By default, the Zing text indexing engine does not index tag text for search. You turn tag indexing on one table at a time, and private tags are not indexed. Text indexing must already be enabled for the table, and the procedure needs the admin role.
- Go to All > System Definition > Dictionary and open the dictionary entry for the table. That entry has the table name in the Table field, an empty Column name, and a Type of Collection.
- In the Attributes related list, select New and use the lookup icon to choose the Text Index Tags attribute.
- Enter everyone_only to index only tags shared with Everyone, or all_shared to index all shared tags.
- Select Submit, then select Generate Text Index in the Related Links section to reindex the table.
Records reindex automatically when tags are added or removed, and when a tag change affects fewer than 100 records. A manual reindex is needed for larger changes and after the initial setup.
Frequently asked questions
Who can see a tag I create?
A new tag defaults to Me, which keeps it visible to its owner alone. Users with the tags_admin role can create a global tag shared with Everyone, and the admin role also has this option.
Can I filter a list by more than one tag?
Yes. Select two or more tag names in the Tags column, and the list filters on all of them with the AND operator, so the results contain all selected tags.
Why did a tag name change to include [private]?
When a private tag has the same name as a shared or global tag, the system adds [private] to the end of the private tag’s name, as in Sample tag [private]. Two shared or global tags cannot share a name.
Can tags be used in reports?
Conditions that use the Tags field are not supported in reports or in data visualizations built on database views.