- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2014 08:34 AM
We like many others, I'm sure, have the ability to search the knowledge base from Incident. I was wondering if there was a way to restrict the results displayed based on business service. I have already added business service to the knowledge base form and I was hoping there would be a way using the dictionary entry attributes of the description field which we use as the basis for searching the knowledge base, we currently have this set to:-
no_truncate=true,knowledge_search=true,ts_weight=10
Our business service field name is u_business_service.
TIA
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2014 10:18 AM
Hi,
I have successfully configured the solution in one of the demo instance. For achieving you need to update below things:
Update dictionary attributes - knowledge_custom=customKnowledgeSearch,knowledge_search=false
Add onLoad Client Script:
function onLoad() {
return;
}
function customKnowledgeSearch() {
var searchText = g_form.getValue('short_description');
var elementName = 'u_business_service';
var url = 'kb_find.do?sysparm_search=' + escape(searchText);
url += "&sysparm_nameofstack=kbpop";
url += "&sysparm_kb_search_table=incident"; //This example runs on the Incident table. Edit the table name as necessary
url += "&sysparm_operator=IR_AND_OR_QUERY"; //Tries an 'AND' exact match query and uses an 'OR' query if no exact match
//url += "&sysparm_operator=IR_OR_QUERY"; //Searches using an 'OR' query
//url += "&sysparm_operator=IR_AND_QUERY"; //Searches using an 'AND' query
popupOpenStandard(url, "kb2task");
}
Please try and let me know the outcome
Regards,
Solutioner
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2014 10:03 AM
Hi Angus,
I have found similar solution in wiki, below is wiki url:
Administering Knowledge Search - ServiceNow Wiki
I am also trying to setup the same in some demo instance
Regards,
Solutioner
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2016 01:32 AM
Hi,
I need to restrict Knowledge_search attribute. When i click, it should work only for "Finance Knowledge" base. Can anyone help on this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2014 10:18 AM
Hi,
I have successfully configured the solution in one of the demo instance. For achieving you need to update below things:
Update dictionary attributes - knowledge_custom=customKnowledgeSearch,knowledge_search=false
Add onLoad Client Script:
function onLoad() {
return;
}
function customKnowledgeSearch() {
var searchText = g_form.getValue('short_description');
var elementName = 'u_business_service';
var url = 'kb_find.do?sysparm_search=' + escape(searchText);
url += "&sysparm_nameofstack=kbpop";
url += "&sysparm_kb_search_table=incident"; //This example runs on the Incident table. Edit the table name as necessary
url += "&sysparm_operator=IR_AND_OR_QUERY"; //Tries an 'AND' exact match query and uses an 'OR' query if no exact match
//url += "&sysparm_operator=IR_OR_QUERY"; //Searches using an 'OR' query
//url += "&sysparm_operator=IR_AND_QUERY"; //Searches using an 'AND' query
popupOpenStandard(url, "kb2task");
}
Please try and let me know the outcome
Regards,
Solutioner
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2014 01:07 AM
Many thanks, just what I wanted.