Show a Table Schema Map from any Form

Table schema maps are a very useful tool to aid in visualizing the setup of a table and its relationships to other tables and fields in ServiceNow. This functionality is something that every ServiceNow implementor or admin should be familiar with. Schema maps are documented here in the ServiceNow wiki.

While the schema map is useful, it can also be difficult to navigate to unless you know exactly where to look. The only place in the system to access the schema map is from the ‘Tables and Columns’ module and this is only available to users with the admin role. In this post I’ll show you how you can make the schema map for a given table more accessible by creating a global UI action link that allows you to display the table schema map from any form in the system – for any role you want.

Show Schema Map

Here’s the UI action code. Notice that it’s set on the ‘Global’ table so that it will be available as a link on every form in the system. You’ll also notice that the ‘Condition’ field is set to allow access to only the admin role. You can adjust this as needed to grant access to other users as well. I’ve also added a couple of checks in the script to see if the action is initiated from the dictionary or the label table. In these cases, the popup will pull from the table defined in the dictionary or label entry – rather than the actual ‘sys_dictionary’ or ‘sys_documentation’ tables.

‘Show Schema Map’ UI Action
Name: Show Schema Map
Table: Global
Action name: show_schema_map
Form link: True
Client: True
Onclick: showSchemaMap()
Condition: gs.hasRole(‘admin’)

function showSchemaMap(){
//Get the table name
var tableName = g_form.tableName;
if(tableName == 'sys_dictionary' || tableName == 'sys_documentation'){
//Use 'Table' field value for dictionary or labels
tableName = g_form.getValue('name');
getTopWindow().popupOpenFocus('' + tableName, 'super_schema', 950, 700, '', false, false);

Date Posted:

February 9, 2012

Share This:


  1. Josh February 10, 2012 at 11:17 am

    Where I found this very useful is when review CI’s and trying to see the relationships. This is very nice for that area. thanks!

  2. Ravish February 16, 2012 at 10:13 pm


  3. Lakshmi Roy November 2, 2012 at 5:05 am

    I tried “Show a Table Schema Map from any Form”
    procedure, but its not working. Kindly suggest some other way.

    • Mark Stanger November 2, 2012 at 5:53 am

      I just tested it on a ServiceNow demo instance and it works fine. This is the only way I know of, so just follow the instructions here.

  4. Jim Coyne December 13, 2012 at 10:26 pm

    I really like this function and use it all the time. I just posted an article on how to do the same thing from a List view as well –

Comments are closed.




Fresh Content
Direct to Your Inbox

Just add your email and hit subscribe to stay informed.