IN operator in filter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-14-2010 02:49 PM
How is it possible to get the IN operator in filter for other tables the way it is present on choices table. Screenshot attached.
Also is it possible to query databse using IN operator the way it is possible in normal SQL.
Select * from employee where department in ('finance','IT','Sales');
Amit
- Labels:
-
Orchestration (ITOM)
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2010 12:39 PM
Amit,
If you are doing this in a GlideRecord query you can do it like this.
gr.addQuery('sys_idIN0331ddb40a0a3c0e40c83e9f7520f860,032ebb5a0a0a3c0e2e2204a495526dce');
or like this
gr.addQuery('sys_id','IN','0331ddb40a0a3c0e40c83e9f7520f860,032ebb5a0a0a3c0e2e2204a495526dce');
Hope this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-19-2016 02:25 AM
Hi Jay,
I am using 'IN' operator in glideRecord query and it's not working either of the way. Can you pls suggested what wrong I am doing here.
(function executeRule(current, previous /*null when async*/){
var gr = new GlideRecord('sys_user_role');
gr.addQuery('name','IN','current.u_role,current.u_end_user_role');
gr.query();
while(gr.next()){
gs.log("2 --Records in role table: " + gr.getRowCount());
//gr.deleteRecord();
}
})(current, previous);