The script include i sent is building a list of the sys_id's of users you want to be available in the reference field. The argument you're returning is:



'sys_id=1234^ORsys_id=sys id of user 1^ORsys_id= sys id of user 2' etc etc



It won't match anything to the 1234, that's just a dummy number to get the syntax in place. Once sys_id=1234 is in place you can repetitively add ^ORsys_id=sys id of user as many times as there are users in the while loop.