Hi All,
Seeing if someone can assist in this:
I have a form that needs to go to specific User Roles based on who is submitting the form. I have created a team to assign it to the specific user(s). Attached is the script.
if($util.getValue('Employee_Name_') == 'user1', 'user2', 'user3', 'user4', 'user5', 'user6') { $result=team.findMembersByRole('CEO'); } if($util.getValue('Employee_Name_') == 'user7', 'user8', 'user9', 'user10') { $result=team.findMembersByRole('CEO', 'Team Leader'); } if($util.getValue('Employee_Name_') == 'user11', 'user12') { $result=team.findMembersByRole('CEO', 'Finance Manager'); } if($util.getValue('Employee_Name_') == 'user13', 'user14', 'user15', 'user16') { $result=team.findMembersByRole('CEO', 'Regional Manager'); } if($util.getValue('Employee_Name_') == 'user17', 'user18') { $result=team.findMembersByRole('CEO', 'Multimedia Manager'); } if($util.getValue('Employee_Name_') == 'user19', 'user20') { $result=team.findMembersByRole('CEO', 'Research Manager'); }
What seems to be happening though, is that if I test using "User1" to see who it will return, it returns 2 users (CEO and Research Manager). Basically, it is always defaulting to the last rule set in the code?
No idea why this would be the case? It is always defaulting to the last code set and the users within that script?
Can anyone advise?
Thank you
Ziad