eric_szonyi
ServiceNow Employee
ServiceNow Employee

Sometimes you may want to launch a KB search with a simple click that will use the contents of one or multiple fields from your form as the search text. It is quite simple.

Create a UI Action and in the Script field you perform a redirect to the kb_find.do UI page. The example searches two example fields from a form. This is server-side so the record will need to be saved before launching the search. The example is also set to make it an OR query.


var url = "kb_find.do?sysparm_search=" + escape(current.FIRST_FIELD) + ' ' + escape(current.SECOND_FIELD) + "&sysparm_operator=IR_OR_QUERY";
action.setRedirectURL(url);

1 Comment