Issue
Users are not able to add the Sys ID field (sys_id) to a list or a form, using Configure Form Layout or Configure List Layout or Personalize List. The Sys ID field does not appear in the Available slushbucket. Users are also not able to add the Sys ID to reports.
Cause
By design, the Sys ID field is not easily available for users to display on forms, lists, nor reports. This is because this field contains a unique numerical identifier for each record. If the Sys ID is modified or deleted, this would lead to bad data and/or data loss.
Resolution
List
If your business requirement is to make the sys_id field visible on the list, follow these steps:
- Go to: System UI > Lists
- Select the record for the Table and View you want to modify
- In the List Elements related list, click the New button.
- Populate the form as follows:
- Element = sys_id
- Position = a number for the place in the list. (In our example, the position on the Incident table OOB would be a value of 11.)
- Execute a cache flush by appending your URL with /cache.do
- Once you navigate back to your list, the Sys ID field is now visible.
Form
If your business requirement is to make the Sys ID field visible on the form, follow these steps:
- Go to: System UI > Views
- Select the record for the View you would like to modify.
- In the Form Sections tab, filter by your table name and then open the record for the form section you would like the Sys ID field to be visible in. The top form section for every table will not have a Caption and will appear blank. This is expected behavior.
- In the Form Section record, click the New button on the Section Elements list. Populate the form as follows:
- Element = sys_id
- Type = element
- Position = a number for the location on the list.
- Execute a cache flush by appending your URL with /cache.do
- Once you navigate back to your form, the Sys ID field is now visible.
Reporting
If your business requirement is to see the Sys ID field on a report, follow these steps:
- Go to: System Definition > Database View
- Create a new View and add the table you want to report on.
- Add a Where clause if needed.
- Select the Fields to add to the View. Make sure to select the sys_id field too.
- Save your view.
- For more information about creating a database view please refer to the following documentation chapter: Database view creation
- For more information about creating a database view please refer to the following documentation chapter: Database view creation
- Create a List report base on the new Database View.
Note: This field should ALWAYS be read-only. There is an OOB ACL (*.sys_id/write) which prevents write access for all users, even admins. Please DO NOT make this field editable for any user, as this could lead to considerable data loss issues. |
Related Links
ServiceNow provides alternative ways to access the Sys ID information:
- From the URL
- From the header bar on a form
- From a script
Detailed information on these options can be found in the following documentation chapter: The unique record identifier (sys_id)
Adding the Sys ID to a form or list view or a report as explained above will still prevent users to export the Sys ID values to a file. ServiceNow provides several ways to get data out of the platform with Sys IDs:
- Using Export Sets
- Using the CSV Web Service and adding Sys ID to the output using sysparm_default_export_fields
- Export > XML
- Export > JSON
Detailed information is available in the following Developer Log: Exporting Data with Sys IDs