Search crawler through Service/Category/Subcategory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Our company is rolling out Service Now in December. We will be on the Yokohama release, utilizing SOW. I want to create a feature my Service Desk agents can use to search through the classification lists using keywords, assisting them in quickly identifying the correct classification. I have been trying to build something utilizing Script Included, but the forms behave a bit differently because of being in the Service Operations Workspace. Has anyone successfully created something like this? Thanks so much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Recommended Solution: Dynamic Reference Qualifiers and Workspace Client Scripts
This approach provides a native, high-performance way to filter the classification fields and integrates well with the SOW environment.
1. Optimize the Reference Qualifier (The Core Solution)
Instead of a generic search, use a Dynamic Reference Qualifier on the fields (Service, Category, Subcategory) to limit the choices based on what the agent types, ensuring they only see relevant options.
Custom Script Include: Create a centralized Script Include (Client Callable) that handles the complex filtering logic.
Logic: The script include should take the current record's details (e.g., assignment group, user type, or a keyword typed into a temporary field) and return a dynamic query string for the reference field.
Example: For the Category field, the script would return something like ^sys_idIN[list of relevant category sys_ids] based on the selected Service.
Advanced Filtering: To allow for keyword searching across the classification fields themselves (which are reference fields to the cmdb_ci_service, cmn_category, or custom tables), you can configure the reference field to display relevant columns and rely on the platform's default type-ahead search/filtering mechanism, which is already optimized.
2. Leverage Search Mapping for Auto-Population
For rapid ticket creation in the SOW, the most effective method is to allow the agents to search the knowledge base (KB) or catalog first.
Contextual Search: Ensure Contextual Search is configured for the Incident form in SOW. When the agent types in the Short Description, relevant KB articles or Catalog Items will appear.
Search Mapping: If the relevant KB articles or Catalog Items are associated with the correct Service/Category/Subcategory, you can use Search Mapping or a Client Script to automatically populate the classification fields on the Incident form when an agent successfully solves an issue or starts a request from a search result.
3. Service Operations Workspace (SOW) Specific Scripting
If you absolutely require a specific on-field-change custom script logic, remember the difference in SOW:
Workspace Client Scripts: Use Workspace Client Scripts (not standard Client Scripts) for any front-end manipulation.
Field Behavior: Since SOW is built on the Next Experience UI Framework, you must use the specific methods available for the workspace. This typically involves using the g_form object's methods, which, while similar, can behave slightly differently, as noted in the query. Test your onChange or onLoad scripts rigorously within the SOW context.
Effective Solution Summary
The most effective solution is to streamline the list of choices for the agent, making the correct option easy to find, rather than building a complex external search mechanism:
Restrict the options using Dynamic Reference Qualifiers (Script Include) so that only categories/subcategories relevant to the selected service are displayed.
Rely on the native platform search functionality within the reference fields, which handles keyword filtering efficiently.
Encourage search-first behavior by optimizing Contextual Search and mapping classifications to common issues and services.
