how to populate list of group members in list collector on change of variables?

User460980
Kilo Contributor

Hi,

1.I have a requirement for a catalog item where I need to populate the list of group members in the left bucket of the list collector as per the group selected in a reference field above.

2. I have a requirement for a catalog item where I need to populate the list of group members in the right bucket of the list collector as per the group selected in a reference field above.

The form looks like this as of now :

1 REPLY 1

suvro
Mega Sage
Mega Sage

You can only achieve first by modifying the reference qualifier to something below

javascript: 'sys_idIN' + script_include call (pass group)

 

In script include return list of group members sys_id

 

var userIds = [];

var grpM = new GlideRecord('sys_user_grmember');

grpM.addQuery('group', 'passed_group');

grpM.query();

 

while (grpM.next()){

userIds.push(grpM.getValue('user');

}

return userIds;

 

 

You need to select from left to right manually as required.