Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Creation of new table is forcing "undefined" into the name - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Creation of new table is forcing "undefined" into the name
KB0750673

Creation of new table is forcing "undefined" into the name


999 Views Last updated : Jul 24, 2025 public Copy Permalink
KB Summary by Now Assist

Issue

Symptoms

The creation of a new table is forcing "undefined" into the name

Release

All versions

Cause

1. When creating a new table, the OOB client script "Table Label Change" on sys_db_object is used to auto-populate the "name" when the label is edited.

https://<instance-name>.service-now.com/sys_script_client.do?sys_id=b4e95dd2c3203000bac1addbdfba8f5d 

2. The script passes a parameter "g.scratchpad.scope" (scope of the record) to a js function "setTableNameFromLabel" (on generate_table_name_with_scope.js) which returns the name.

3. The OOB on-display business rule "Set Current Record Scope in scratchpad" on sys_metadata is used to set the "g_scratchpad.scope" parameter value for the record.

https://<instance-name>.service-now.com/sys_script.do?sys_id=4659d132d7232100b6bddb0c8252039e

4. If the above business rule is deactivated or deleted, then the value of "g_scratchpad.scope" is undefined which causes the js function to return the name with "undefined" in it.

Resolution

Reverting the business rule back to OOB version should fix the issue. Tables already created with "undefined" in the name can be deleted using TableUtils API.

Additional Information

This can also happen if any other custom script on sys_metadata or sys_db_object is updating the value of "g_scratchpad.scope" parameter to undefined. If so, the custom script can be modified so that the parameter is not set to undefined.


The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.