ServiceNow — Creating a Defined (Custom) Related List

Jon Humphreys
2 min readJun 4, 2024

--

Defined (Custom) Related Lists

Sometimes you have a list that is not directly tied to a table that you want to have in a record. This allows any two tables that can have a logical relationship to appear as a parent/child pair via a related list. For example, you may want to query the history table so that a user can see how often a specific field has been updated in a record.

Click in the Navigator (side-nav) search bar and look for System Definition > Relationships, click New.

  • Give your related list a name (it will be the same name used for the tab in the related lists section of the record).
  • Applies to table = ‘parent’ table
  • Queries from table = ‘current’ table
  • In this example, Advanced will be left blank

Under Query with, you will be given an example function with query that you can build from.

  • In this example, I want to accomplish the following:
  • Query the sys_history_line (history) table for a specific label (field name).
  • Query the same table to gather all history records matching the sys_id of the parent record from the Applies to table.
  • Order by descending so that the newest record is displayed at the top of the list.

Save to commit your change and then head to the table where you want to add the newly created list.

  • Right-click in the grey banner and then select Configure > Related Lists.
  • Find the list you made under the Available column and add it to the Selected column. Sort the lists in the Selected column any way you choose before selecting Save.
  • Right-click on a column in the related list and select Configure > List Layout if you would like to add/remove columns from your related list.

Your users should now be able to access your newly created list! Good job!

Side note: if any users can’t see the list, check their permissions (or check the table’s Access Control List).

--

--

Jon Humphreys
Jon Humphreys

Written by Jon Humphreys

Meet Jon, a programmer blending creativity with precision to craft the tech future.

No responses yet