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.
Mandatory variables on Service Catalog RITM records are intermittently created with empty values - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Mandatory variables on Service Catalog RITM records are intermittently created with empty values
KB0622887

Mandatory variables on Service Catalog RITM records are intermittently created with empty values


3936 Views Last updated : Dec 9, 2024 public Copy Permalink
KB Summary by Now Assist

Issue

This article applies when the following symptoms and conditions are present:
  • Requested items are intermittently created with missing values for all/some mandatory variables.
  • Other variables on the requested item have values.
  • Catalog client scripts are used on the catalog item or variable sets.
  • Asynchronous GlideAjax was used in the catalog client scripts to auto-populate fields that are mandatory, or asynchronous GlideAjax are used in the catalog client scripts and response determines if the mandatory flag is set for another variable, or asynchronous GlideAjax are used in the catalog client scripts of the catalog item or variable set.

Release

All releases.

Cause

An asynchronous GlideAjax, "getXLM(<callback function>)" allows the client side to continue to load without waiting for a response from the server; it includes a callback function that processes the GlideAjax response once received. When catalog client scripts on a catalog item or variable set contain asynchronous GlideAjax, users are able to checkout before the response is received, before the mandatory variables are populated, or before the mandatory flag is evaluated based on the result of the response. These scenarios will result in the mandatory variable not containing a value.

Resolution

Because of the nature of asynchronous GlideAjax, the script performance will depend upon server response time to the Ajax call.

It is necessary to add an onSubmit catalog client script to re-evaluate / re-affirm those mandatory variables are not empty during the checkout process. This process also allows extra time for the response from the server to come back.

It is also possible to use the getXMLWait method instead of getXML.

Related Links

Creating an onSubmit catalog client script to verify that a mandatory variable is not empty


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.