Reference qualifier to show specific user group

nealp_
Tera Contributor

I have a field on the form "Executives" and I want to use reference qualifier to show a specific group 'exec_group'. I can reference the 'user' in the reference but how do I filter through to show just the user group with select few users?

1 ACCEPTED SOLUTION

Abhinay Erra
Giga Sage

You need advanced reference qualifier for this. Create a script include and put this script in there


function   GetExecutiveMembers(){


  var id=[];


  var gr= new GlideRecord('sys_user_grmember');


  gr.addQuery("group.name","your group name");


  gr.query();


  while(gr.next()){


  id.push(gr.getValue("user"));


  }


  return "sys_idIN"+id.join();


}


View solution in original post

10 REPLIES 10

Yes, thank you The function was part of a running script include, so had to call it a bit differently.