What does' sys_idIN' mean when used in a query? Eg : 'active=true^sys_idIN' + function( )

Rama Chandra D
Kilo Guru

I'm trying to figure out a script which has the syntax mentioned in the question, that is 'active=true^sys_idIN' + function( ). Can someone explain to me what does sys_idIN do here? Does it simply include the sys_id passes to the query as one of the a condition?

1 ACCEPTED SOLUTION

Use this



javascript: 'typeLIKExxxx^active=true^sys_idIN' + gs.getUser().getUserByID(user id).getMyGroups().toArray().join() + '^EQ'


View solution in original post

20 REPLIES 20

What are you passing in the user id   in gs.getUser().getUserByID(user id).getMyGroups() ??


the user id, just as an example, in my case it is my firstname.lastname.


Use this



javascript: 'typeLIKExxxx^active=true^sys_idIN' + gs.getUser().getUserByID(user id).getMyGroups().toArray().join() + '^EQ'


Deepak Ingale1
Mega Sage

Hi Darshak,



This query you posted in an encoded query which says give me "active=true" & sys_ID "Is One Of" returned by the function call.


You can use this kind of queries in "reference qualifiers".



Kindly let me know what you are trying to do so that I can assist you with the code.


scottcornthwait
Kilo Expert

Okay, so you're trying to receive a list of groups that the current user is part of, where the group type is marked as Request?



Is this for a business rule script? a Reference Qualifier?



Also, is the encoded query being run against the group table? or run against the group membership table?