select random user from group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2020 12:12 AM
i want to select random user from a hard coded group, pls find below logic and suggest.
if it goes inside if it should consider approverList , if it goes else condition it should consider hard coded group and it should send approve randomly for any one person in group
if (approverList.length == 0) {
approverList.push(gs.getUserID());
return approverList;
} else {
var group = new GlideRecord("sys_user_group");
group.addQuery("sys_id", "d0b0871adbf45780a167d6fa4b9619a0");
group.query();
if (group.next()) {
i=0;
for( )
return group;
}
}
- Labels:
-
Multiple Versions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2020 03:50 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2020 04:14 AM
can you place the cursor on the error and share what the error was.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2020 11:56 PM
Hello Deepthi,
Do you have any update on this? If the issue is resolved, kindly mark my comment as a correct answer so that the question is moved to the solved list.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2020 03:50 AM
Approver count: 1 - 867f2008dbc3d780626ce9ec0b961912 - log
but i got as error

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2020 12:12 PM
Hello Deepthi,
If the issue is resolved, kindly mark my comment as a correct answer so that the question is moved to the solved list.