1

In my catalog item I have a Manager variable and a list collector called Members containing users, I need to auto populate the list collector with users whose manager is in the Manager field. How do I do that?

script that autopopulates the list collector with users whose manager is in the manager field

syvny
  • 11
  • 1

1 Answers1

0

Best option would be to create a client callable script include that gets called on the Members' variable reference qualifier. The script include would have a function with a parameter (managerSysId for example), and a simple query on the sys_user table, where manager = sys_id selected on the Manager's field, and will return an array of user sys ids.

On your reference qualifier, you would have something like: javascript: 'sys_idIN' + new getUsersWithManager().getUsers(current.variables.manager), being getUsersWithManager the name of your script include and getUsers the function that makes the query.