Notifications

5767 views

Description

Symptoms


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, we do not make the Sys ID field easily available for users to display on forms and lists and reports. This is because this field contains the 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:

  1. Go to: System UI > Lists
  2. Select the record for the Table and View you want to modify
  3. In the List Elements related list, click the New button. Populate Element = sys_id and Position with a number for the place in the list. (In our example, the position on the Incident table OOB would be a value of 11.)



  4. Execute a cache flush by appending your URL with /cache.do
  5. 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:

  1. Go to: System UI > Views
  2. Select the record for the View you would like to modify.
  3. 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.



  4. In the Form Section record, click the New button on the Section Elements list. Populate Element = sys_id, Type = element, and Position with a number for the location on the list.



  5. Execute a cache flush by appending your URL with /cache.do
  6. 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:

  1. Go to: System Definition > Database View
  2. Create a new View and add the table you want to report on. Add a Where clause if needed.
  3. Select the Fields to add to the View. Make sure to select the sys_id field too.
  4. When done save your View.

    For more information about creating a database view please refer to the following documentation chapter: Database view creation
  5. Create a List report base on the new Database View.


IMPORTANT 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.

Additional Information


ServiceNow provides alternative ways to access the Sys ID information:

  1. From the URL
  2. From the header bar on a form
  3. 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:

  1. Using Export Sets
  2. Using the CSV Web Service and adding Sys ID to the output using sysparm_default_export_fields
  3. Export > XML
  4. Export > JSON

Detailed information is available in the following Developer Log: Exporting Data with Sys IDs

Article Information

Last Updated:2019-08-02 21:11:05
Published:2019-02-11
adding the sys_id to a form via new section element record.pngafter creating the list element record, sys_id can be seen on the related list.pngcreate new list element record for sys_id.pngfilter by table name to open the form section you want to add the sys_id to.pngsys_id is visible from the table.pngsys_id is visible on the form.png