Virtual Agent Designer Knowledge Article show more option

yashvi
Tera Contributor

Hi,

 

The OOB flow - Open IT Ticket 2.0 (template) creates an Incident which displays the knowledge articles. However, it shows by default only 3 options and then the show more button. Is there any way we can modify this value?

I have tried to change the "limit" variable but that doesn't make any difference, it still displays 3 options. 

Can anyone suggest from where this value can be changed.

 

Thank you

2 REPLIES 2

Amit Gujarathi
Giga Sage
Giga Sage

Hi @yashvi ,
I trust you are doing great.

To modify the number of knowledge articles displayed in the Incident form created by the OOB flow - Open IT Ticket 2.0 template, you'll need to make a slight adjustment to the related UI script. Follow the steps below:

  1. Log in to your ServiceNow instance with an account that has administrative privileges.
  2. Navigate to the ServiceNow Application Menu and search for "Flows".
  3. Open the "Flows" module and locate the "Open IT Ticket 2.0" flow.
  4. Click on the flow to open it and navigate to the "Show Knowledge" activity.
  5. Inside the "Show Knowledge" activity, there will be a UI script referenced. Note down the name of the script.

Now, let's modify the UI script:

  1. Navigate to the ServiceNow Application Menu and search for "Scripts - Background".

  2. Open the "Scripts - Background" module and search for the UI script name noted earlier.

  3. Open the UI script and look for the section where it retrieves the knowledge articles. It might involve a GlideRecord query or a similar method.

  4. You will need to locate the line of code that controls the number of articles displayed. It might look similar to this:

    knowledgeArticleGR.setLimit(3);
    5. Modify the number "3" to your desired value. For example, if you want to display 5 articles, change it to:
     

 

knowledgeArticleGR.setLimit(5);

 

  1. Save the UI script.

 

Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi