We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Knowledge Contextual Search not showing the selected products' Knowledge Articles

sreeshsurendran
Tera Guru

Knowledge Contextual Search not showing the selected products' Knowledge Articles. It's showing as undefined.

 

sreeshsurendran_0-1704455086287.png

 

 

Script inside Select Products:

 

 

(function execute() {
   var options = []; // add options here...
   var prd = new global.VirtualAgentUtils().getSoldProductsName();
   prd = prd.split(',');
   for(var i = 0;i<prd.length;i++)
   {
   if(prd[i] != 'Other')
   {
   options.push(
       { 'Value': prd[i],
        'label': prd[i],
        'render_style': 'data' 
        }
        );
        }
   }
    return options;
})()

 

 

Same input variable, I'm passing this in the OOTB contextual Search.

0 REPLIES 0