sys_idNOTIN not working

Martin_samek
Tera Contributor

Hi, I have prepared a advanced reference qualifier on a incident table, directly on "assignment_group" field. In the ref. qualifier and I am calling a script include like this: 

javascript:new SportChallengeGroupIds().createReferenceQualifier(current.subcategory). The calling operation and script include is working fine. I am basically querying only active groups, which has type of "ITIL" or type is empty (not part of this example). Then I have a condition which verifies whether the "subcategory" field has value of "sport challenge app" - IF true then I am trying to exclude group with specific ID and that is the part which is not working correctly. I simplified the method I am using but this is basically not working:

createReferenceQualifier: function(subcategory ) {
    var qualifier = '';
    if (subcategory == 'sport challenge app') {
        //NOT Working option
        qualifier = 'sys_idNOTINa46babb247a731105911a16f316d437e';
        //Working option
        //qualifier = 'sys_idINa46babb247a731105911a16f316d437e';
    }
    return qualifier;
}

 

I actually tried to use directly this option - sys_idINa46babb247a731105911a16f316d437e - works and I can choose only the group with this specific ID but I want to actually reverse the condition and I want to exclude this specific group so I tried this: sys_idNOTINa46babb247a731105911a16f316d437e - this is not working, group is still available for selection. Any idea why is the group not excluded from the selection? Am I missing something?

1 ACCEPTED SOLUTION

Mark Roethof
Tera Patron
Tera Patron

Hi there,

 

Instead of "NOTIN", can you test with "NOT IN" (note the usage space).

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

View solution in original post

3 REPLIES 3

Mark Roethof
Tera Patron
Tera Patron

Hi there,

 

Instead of "NOTIN", can you test with "NOT IN" (note the usage space).

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Hi Mark, that is actually working! Thank you.

But what is the problem? I am not able to find this syntax anywhere, it is always mentioned without the space.

I would have to search for any documentation on that, I just do that from the top of my mind, just always using "NOT IN" 😅

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn