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.
Display information from a custom field created on catalog item table in Service Portal - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Display information from a custom field created on catalog item table in Service Portal
KB0756664

Display information from a custom field created on catalog item table in Service Portal


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

Description

This article describes how to get the value from non default fields in SC Catalog Item widget and display them in Service Portal

Procedure

  1. Clone the OOB SC Catalog Item widget.
  2. In Server script of widget code, add the below lines after Line 65 :
                var catTest = $sp.getParameter('sys_id'); // to get the sys_id of the catalog item from Portal URL
var gp = new GlideRecord('sc_cat_item');
gp.addQuery('sys_id',catTest);
gp.query()
while(gp.next()) {
data.stest = gp.getValue('u_stesting');
}

          In this case, u_stesting is the custom string type field created on sc_cat_item table, that needs to be displayed in Service Portal

         3. Now in the Body HTML Template of the widget, below  

          <div class="text-muted sc-cat-item-short-description" ng-if="::data.sc_cat_item.short_description">{{::data.sc_cat_item.short_description}}</div>

         add

                <p>Test {{::data.stest}} </p>

          4. Use the cloned version of the widget in sc_cat_item or any custom page used in Service Portal used to display the catalog item

Applicable Versions

Any supported release

 


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.