- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2018 08:50 AM
Hi,
I have a script include I have used to filter the task list eg. sys_id is javascript:assignedIsGroupManager()
Can I use this same filter on an SLA stop condition? I have tried it by entering the same on the SLA definition but it is not having the desired effect.
Am I missing something?
Thanks
Rob
Solved! Go to Solution.
- Labels:
-
Service Level Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2018 01:00 PM
The short answer is no, this feature is not currently available for SLA Condition processing.
From an architecture standpoint, the conditions work this way:
- When you specify a condition in the SLA Definition, you use the filter builder to construct an encoded query.
- When the SLA Engine does it's condition checking, it does it by executing the encoded query for a single task record:
- i.e., WHERE <encoded query> AND sys_id returns a record, the condition is true; if nothing is returned, the query is false.
And the script processing you want as a filter condition (like for a reference qualifier) needs to be done as a pre-processing step, to generate the final encoded query.
You might want to try the following method to implement this:
a. Create a custom field to hold your script include return result: for example, u_my_condition true/false
b. Create a before-insert business rule to evaluate your script include function and store the result in your custom field.
c. Add your custom field to the desired SLA Condition: AND u_my_condition is true
Ed Wajs
ServiceNow Technical Support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2018 01:00 PM
The short answer is no, this feature is not currently available for SLA Condition processing.
From an architecture standpoint, the conditions work this way:
- When you specify a condition in the SLA Definition, you use the filter builder to construct an encoded query.
- When the SLA Engine does it's condition checking, it does it by executing the encoded query for a single task record:
- i.e., WHERE <encoded query> AND sys_id returns a record, the condition is true; if nothing is returned, the query is false.
And the script processing you want as a filter condition (like for a reference qualifier) needs to be done as a pre-processing step, to generate the final encoded query.
You might want to try the following method to implement this:
a. Create a custom field to hold your script include return result: for example, u_my_condition true/false
b. Create a before-insert business rule to evaluate your script include function and store the result in your custom field.
c. Add your custom field to the desired SLA Condition: AND u_my_condition is true
Ed Wajs
ServiceNow Technical Support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2018 12:38 AM
Thanks Ed,
I'll give the custom field solution a go
Cheers
Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2018 12:42 AM
You can also look into custom SLA Condition rules: SLA condition rules