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.
How to change the ammount of text (number of characters) displayed on search results page in the portal - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • How to change the ammount of text (number of characters) displayed on search results page in the portal
KB0691967

How to change the ammount of text (number of characters) displayed on search results page in the portal


525 Views Last updated : Jan 3, 2025 public Copy Permalink
KB Summary by Now Assist

Issue

This article will explain how to change the amount of text (number of characters) displayed on search results in the service portal search page.

This only applies to scripted search sources and specifically the Knowledge Base and Questions and Answers ones OOB. 

Release

Service Portal

Resolution

1) Navigate to service portal > portals and select the portal which has the search source you want to edit.

2) In the related list of the portal record, select the Search Source you want to edit. 

3) Find the code which is returning the text. In the case of Knowledge Base, it is this.

$sp.getRecordDisplayValues(article, kb, 'sys_id,number,short_description,published,text');
article.publishedUTC = kb.getValue('published');
article.type = "kb";
if (!article.text)
article.text = "";
article.text = $sp.stripHTML(article.text) + "";
article.text = article.text.substring(0, 200);
 
4) Edit the line which is cutting down the text, which this:
article.text = article.text.substring(0, 200);

 

Related Links

Documentation on Search Sources. 

https://docs.servicenow.com/csh?topicname=add-table-search-source.html&version=latest

 


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.