- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2020 12:44 AM
Hello Experts,
In my instance one of BR there is condition 'current.watch_list.changes() && !current.comments.changes()'
I understand that changes() is GlideElement method.
I want to know what is the meaning of !current.comments.changes()
Does it mean current comments changes or not changes?
And why we put ! (exclamation) before current.anyField.changes() ?
Help will be appreciated 🙂
Solved! Go to Solution.
- Labels:
-
Incident Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2020 12:53 AM
Hi,
Whenever you want to negate a condition, you use ! before the condition.
In your case, !current.comments.changes() means comments NOT changing.
the BR will work only when watch list changes but no comments added.
Kindly mark the comment as a correct answer and helpful if it helps to solve your problem.
Regards,
Asif
2020 ServiceNow Community MVP

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2020 12:48 AM
Hi Amit,
It would mean 'Comments' does not change. Adding an '!' would negate the condition.
So, the above would function only if the
comments for current record does not change &
watchlist changes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2020 12:49 AM
Hi,
! is the NOT operator. Using it in any such condition reverses the condition
For eg
if i have to check whether x is not equal to 5, i can to it as
x !=5 OR !(x==5)
Both will work the same.
In your example it is checking for comments NOT changing.
Hope this helps.
-Anurag

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2020 12:53 AM
Hi,
Whenever you want to negate a condition, you use ! before the condition.
In your case, !current.comments.changes() means comments NOT changing.
the BR will work only when watch list changes but no comments added.
Kindly mark the comment as a correct answer and helpful if it helps to solve your problem.
Regards,
Asif
2020 ServiceNow Community MVP