Configure quick filters using an extension point
On this page
Configure quick filters using an extension point
Use script includes to add quick filters to Dispatcher Workspace.
Before you begin
Role required: admin.
Warning: You must understand JSON code to perform this procedure.
About this task
Dispatcher Workspace provides five quick filter criteria. To filter on a field that isn’t included by default, create a script include, then add it as a new implementation so it appears as a selectable filter.
Which table the Skill criterion reads from depends on the com.snc.skills_management.wm_task_migrate_skills system property:
-
When the property is set to true, the criterion evaluates the Task Skills (task_m2m_skill) table.
-
When the property is set to false, the criterion evaluates the skill field in the task table.
Each criterion is an implementation of a scripted extension point, including the five shipped by default. Implementation partners can extend the same point to add criteria based on other tables related to the work order task.
Procedure
-
Create a new script include.
-
Make additions or update the script include:
-
Object.extendsObject(DispatcherWorkspaceQuickFilterExtensionPoint, { ... })
-
Scope: sn_fsm_disp_wrkspc
-
Implement all required methods: isActive, getFilterType, getFilterId, getDisplayName, getFilterOptions, getOperators, getOperatorGroups, getFilterData, applyQueryCondition, matchesBatch, getOperatorExecutionModes, buildCondition
-
getFilterType() returns "task"
-
getFilterId() returns a stable unique string key
-
getOperatorGroups() uses groupId: 'positive' / groupId: 'negative'
-
Use GlideRecordSecure (not GlideRecord)
-
Guard empty searchString, empty selectedValues, empty taskSysIds
-
-
Add the script include as a new implementation of the extension point:
-
point: sn_fsm_disp_wrkspc.DispatcherWorkspaceQuickFilterExtensionPoint
-
script_include: sys_id of the Script Include above
-
active: true
-
sys_scope: sn_fsm_disp_wrkspc
-
order: unique value (existing ones use 100, 300 — pick next)
-
Keep exploring.
Find another answer, or bring this documentation into your own tools.