- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2016 06:42 PM
Hello,
I am trying to query the assignment_group in my tasks table but I think I am hitting an error due to my lack of understanding the user groups.
I want to filter for the assignment group called AOM-OU. I tried replacing assignment_group with sys_user_group since I noticed that this was a reference field in the form.
var tasks = new GlideRecord('sc_task');
tasks.addQuery('sys_user_group', 'AOM-OU');
tasks.query();
This should be a simple query but I'm not sure where I am going wrong...
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2016 08:13 PM
- var tasks = new GlideRecord('sc_task');
- tasks.addQuery('assignment_group', 'sys_ID'); //sys Id of assignment group
- tasks.query();

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2016 08:13 PM
- var tasks = new GlideRecord('sc_task');
- tasks.addQuery('assignment_group', 'sys_ID'); //sys Id of assignment group
- tasks.query();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2016 02:35 PM
Hm.. I want all the records within a specific group but there are multiple sys_ids for one specific assignment group. How do I get the sys_id of the group?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2016 02:42 PM
J/K I think I looked at the wrong place for the sys_id!
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2016 08:25 AM
Hi Zhen,
Could you guide, where did you query the assignment_group in TASK table and used the below code to get the desired result
- var tasks = new GlideRecord('sc_task');
- tasks.addQuery('assignment_group', 'sys_ID'); //sys Id of assignment group
- tasks.query();
Thanks in advance