Can I Reuse an Existing HR Condition with "Is Not" Operator?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
Hello Community!
I have a requirement where I need to select multiple job numbers in an HR condition using the "is not" operator. Since the "is not one of" operator is not available, I need to create multiple conditions using "is not".
There is an existing HR condition that contains all job numbers with the "is one of" operator. I would like to know if I can reuse this HR condition with the "is not" operator in my new HR criteria. That would really save a lot of time.
I would appreciate any help on this.
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
not possible.
you will have to use IS NOT multiple times there
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
Hello @N_Snow ,
No, you cannot directly reuse an existing HR Condition and invert it (use “is NOT” against another condition).
HR Conditions in ServiceNow do not support condition nesting, referencing, of another condition.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
Hi @N_Snow,
Did you consider to use a Scripted HR Condition?
This way you can get all the ''is not'' numbers from your HR condition and filter on it.
Example:
(function() {
// Get users matching the existing HR Condition
var included = new sn_hr_core.HRCondition().getUsers('existing_condition_sys_id');
// If the current user is NOT in that list, return true
return !included.contains(current.user);
})();
