- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2024 01:07 AM
I want to restrict the groups displayed in the assignment_group field on the incident form using a reference qualifier. However, I am unable to find the dictionary entry for assignment_group in the incident table. I discovered that the reference table is task, which itself references another table. I believe the base table might be sys_user_group, but I am not certain. Can someone provide guidance on this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2024 01:45 AM
Reference Qualifier is the way to go Mate.
Only tip would be try not to hardcode Groups & if the condition is too long then call a script include. And make sure you test it well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2024 02:10 AM
@JJose You should mark @Sandeep Rajput's response as correct as well.
You can mark 2 correct answers to a question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2024 02:08 AM
@JJose Reference qualifier is the correct approach.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2024 08:10 AM
Sorry Sandeep, is it possible to call a script include in a reference qualifier?, I have tried but its not working, Any tips or ideas will help me, Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2024 08:23 AM
@JJose Yes, it is possible to call a script include in the reference qualifier, make sure that your script include method returns 'sys_idIN' and a comma separated list of sys_ids.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2024 09:14 AM
This is how you can call scripts include in Reference Qualifier, eg below
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2024 12:18 PM
I am trying to use the script below to remove 2 groups from the assignment_group on the PDI instance, but it is not working. Can you check what's wrong?
function groups() {
// Create a new GlideRecord object for the 'sys_user_group' table
var gr = new GlideRecord('sys_user_group');
// Add a query to filter only active groups
gr.addQuery('active', true);
gr.addQuery('name', '!=', 'Database'); // Exclude the group with name 'test1'
gr.addQuery('name', '!=', 'Hardware'); // Exclude the group with name 'test2'
// Execute the query
gr.query();
// Initialize an empty array to hold the sys_id values
var groups = [];
// Iterate over the results
while (gr.next()) {
// Add the sys_id of each group to the array
groups.push(gr.sys_id.toString());
}
// Return the sys_ids as a comma-separated string
return groups.join(',');
}
Reference Qualifier --> javascript:'sys_idIN'+new TT().groups();