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.
Variables with a default value and client script will not populate in service portal - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • Variables with a default value and client script will not populate in service portal
KB0724438

Variables with a default value and client script will not populate in service portal


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

Description

Variables with a default value and client script will not populate in service portal.

Steps to Reproduce

1) Navigate to any record producer
2) Create a variable set
3) Within that variable set create a new reference variable with a reference to the "sys_user" table. Set the default value to javascript:gs.getUserId();
4) Create an on load catalog client script on the record producer above.
- UI type - ALL
- Type - onLoad
- Script - g_form.setValue("variable_name",g_user.getFullName());
5) Open the above record producer in the portal, notice the value doesn't populate.

Tested the above in the latest kingston release and the value does populate.

Workaround

This issue is under review. To receive notifications when more information is available, subscribe to this Known Error article by clicking the Subscribe button at the top right of the article. If you are able to upgrade, review the Fixed In or Intended Fix Version fields to determine whether any versions have a planned or permanent fix.

 


Related Problem: PRB1320929

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.