- 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-25-2014 06:27 AM
Forgot I'd made changes in Dev and have now cloned live over Dev what field should I update the dictionary attributes for please?
Sure I got this working last week and have now gone blank 😞
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-25-2014 06:34 AM
No worries I've got it now 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2016 04:05 AM
Hello ,
I have a requirement where in i need to show the knowledge articles both retired and published articles based on the text given in short description of an incident. I have not been able to customize the code you've given to any good effect . Could you please help me out with this .
Regards,
Sai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-16-2018 03:24 AM
What's the purpose of this variable, it doesn't seem to get used anywhere?
var elementName = 'u_business_service';
I'd also like to know how to hide or remove the "Attach to <table>" button that is shown in 'kbpop' popup, but only for this custom search i.e. I don't want to affect existing knowledge searches.