- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-21-2016 07:14 AM
The following condition works when the assignment group value selected from the assignment_group drop down list is 'Maintenace':
current.assignment_group.changes() && current.assignment_group.getDisplayValue() == 'Maintenance'
However, this condition does not work when the same 'Maintenance' value is autopopulated via an assignment rule
Further, this condition was used in replacement for my original condition (!current.assignment_group.nil() && current.assignment_group.changesTo(gs.getProperty('table.external_group'))) because I couldnt get that to work. The issue appears to be the use of the function changesTo().
Can anyone help please?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-21-2016 12:19 PM
Check the order field on your business rule. There is some coordination between assignment rules and business rules you should be aware of.
Check section 1.2.1 here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-21-2016 08:41 AM
Going forward, then the only solution is to use what I have?
!current.assignment_group.nil() && current.assignment_group.changes() && current.assignment_group.getDisplayValue() == gs.getProperty('table.maintenance.external_group')

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-21-2016 08:44 AM
As long as it's not an async BR, you're find using changes(), changesTo(), and changesFrom().
Async business rules have no concept of the 'previous' object os they don't have anything to compare to.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-21-2016 08:48 AM
I should have included this earlier...
Reference:
Business Rules - ServiceNow Wiki
Business Rules Best Practices - ServiceNow Wiki

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-21-2016 08:45 AM
Looks okay but I don't remember if .changes() works or not with Async.
I would try to add a log in the script and check if that condition actually works or not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-21-2016 08:53 AM
This condition definitely works in an async Business Rule:
!current.assignment_group.nil() && current.assignment_group.changes() && current.assignment_group.getDisplayValue() == gs.getProperty('table.maintenance.external_group')
I get to successfully consume my web service, and update my task ticket work_notes and correlation_id fields. The ecc queue has an entry and using gs.info shows me the values I am consuming.