- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2020 02:12 AM
i want to fetch few groups in an array,
after that if the change request is having approval for this groups the Approval automatically has to set No longer Required.
so here how can i write an business rule, which will check the approval group, if the approval group is one of these fetched ones, then the approval has to set "No longer Required"
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-08-2020 01:48 AM
Hi,
so can you add a log above if and print current.assignment_group and groups array and check what the value it contains.
Technically,both should be group sys_ids and if you think the assignment group present in your list of groups, then manually verify the sys_id of assignment group in the groups array or in your table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2020 02:27 AM
Hi,
Can you share the script here which is not working as expected?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2020 02:28 AM
i have not written any till now. am asking someone to help with scripting for this requirement in business rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2020 02:29 AM
Hi,
Follow this link
If it helps you please mark as correct/helpful
Regards,
Monali Patil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2020 03:43 AM
hi ,
Please refer below:
var grp= new GlideRecord('sys_user_group');
grp.addActiveQuery();
grp.query();
while(grp.next())
{
var grpArray = [];
grpArray.push(grp.getDisplayValue('name'));
}
gs.log(grpArray.join(','));
Regards
aj
Mark the comment as a correct answer and helpful if it helps.