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.
Catalog items in Service Portal are stuck at "Submitting..." when there are catalog client scripts or UI policies that use g_form.setValue() but the second parameter is not wrapped in quotes. - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • Catalog items in Service Portal are stuck at "Submitting..." when there are catalog client scripts or UI policies that use g_form.setValue() but the second parameter is not wrapped in quotes.
KB0722971

Catalog items in Service Portal are stuck at "Submitting..." when there are catalog client scripts or UI policies that use g_form.setValue() but the second parameter is not wrapped in quotes.


4782 Views Last updated : Apr 7, 2024 public Copy Permalink
KB Summary by Now Assist

Description

When submitting / ordering a catalog item in Service Portal the page is stuck at "Submitting...".

This is due to the catalog clients scripts and/or catalog UI policies on the catalog item that use g_form.setValue() function but the second parameter for the function is not wrapped in quotes.

For example:

g_form.setValue("short_description", abc);

Instead of:

g_form.setValue("short_description", "abc");

 

Please note that there is another issue with similar symptom but the cause is different. If the resolution on this does not apply please visit the following knowledge article to see if that one applies:

KB0684628

Steps to Reproduce

1) Create a new catalog item

2) Create one variable for it of type Checkbox

3) Create an onLoad catalog client script for this item with the following code:

function onLoad() {
//Type appropriate comment here, and begin script below
g_form.setValue("name_of_the_variable", true);

}

4) Now open this catalog item in Service Portal and click "Order Now"

5) See now that the item won't submit and will be stuck at "Submitting..."

-->If the browser's console is opened the following error message is observed:

Workaround

This is an expected platform behavior now that the second parameter of the g_form.setValue() function must be wrapped in quotes for its functionality to work correctly in Service Portal. This applies to all variable types.

For example, even for a boolean type (i.e. Checkbox) the parameter must be wrapped in quotes.

Example: g_form.setValue("checkbox_variable", "true") and NOT g_form.setValue("checkbox_variable", true);

 

The resolution on this would be to review all catalog client scripts and UI policies (including the ones in variable sets) for any catalog items that have this behavior and adjust them accordingly.


Related Problem: PRB1304542

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.