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.
glide_list (e.g. watchlist) set with display values with a comma in it, are not parsed correctly - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • glide_list (e.g. watchlist) set with display values with a comma in it, are not parsed correctly
KB0622075

glide_list (e.g. watchlist) set with display values with a comma in it, are not parsed correctly


4198 Views Last updated : Apr 26, 2024 public Copy Permalink
KB Summary by Now Assist

Issue

glide_list set with display values with a comma in it, are not parsed correctly



Problem


When creating or updating a record that contains a glide_list field (for example, watchlist), if the input value has a comma in any of the values, the API treats the input as two (2) different values instead of one name that contains the comma.

Symptoms


  1. Create a new user with a name of "test, user one".

  2. Execute the following:

    test();
    function test() {
        var a = new GlideRecord("incident");
        a.setDisplayValue("watch_list", "test, user one, abraham.lincoln");
        a.insert()
    };
    

    Note that watch_list has test, user_one, abraham.lincoln as three different entries.

Cause


The glide_list field parses values set as a comma-separated values.

Resolution


There are several possible options:

  • Remove commas from the display name of the relevant records.

  • Set the glide_list field with the relevant sys_id of the target records.

  • Use a string field to populate the required value.

  • Use a custom separator for values with commas that is then processed using logic within the instance.

    glide_list field parses values set as a comma-separated list. The display value from getDisplayValue() can be customized with a separator by setting the property glide.ui.glide_list.separator to a string.


 


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.