- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2024 10:06 PM
I have created a one-check box with the label "not visible in assignment group" in the group table form when that checkbox is selected we want to make sure the group is not visible in any Assignment groups How can we do this using script
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2024 10:42 PM - edited 02-07-2024 10:49 PM
You can create a before query business rule in groups table which should trigger only for sys_ref_list
view.
refer below script
if(gs.action.getGlideURI().getMap().get('sysparm_view')=='sys_ref_list'){
current.addQuery('checkboxfieldname',false); // will show only groups with that checkbox is false
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2024 10:11 PM
Hi @sagar0711 You dont need script for this. Just simple reference qualifier will work on Assignment Group fields.
Your reference qual condition will be
fieldname is not True
Ensure you do this by doing a dictionary override to all child tables if extended from TASK.
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2024 10:20 PM
I want do that for all tables where the assignment group field is present but the tables do not have any relation between them.
I have already applied the reference qualifier condition but it only works for a perticular table.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2024 10:25 PM
Hi @sagar0711 Assignment group field is a reference field so you can hide few records based on reference qual only,
other option I could think is of ACL on Group table. Create a read acl with condition and return false so that those groups dont appear anywhere
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2024 10:42 PM - edited 02-07-2024 10:49 PM
You can create a before query business rule in groups table which should trigger only for sys_ref_list
view.
refer below script
if(gs.action.getGlideURI().getMap().get('sysparm_view')=='sys_ref_list'){
current.addQuery('checkboxfieldname',false); // will show only groups with that checkbox is false
}