Hello,
I am essentially trying to use a filter (dynamic) and compare the submitting user and the user with the role of approver and make sure they dont match. For instance if Bob submits a request but Bob is also the approver, I want it to go to approver2 instead of approver1. Is there a way to do this in the JS on forms?
If someone cant answer that but can tell me what information is passed (username, full name, etc) when it finds out the role and displays the persons name when you test the filter, that would be great. I can then use that to compare.
Kind of a sample that I typed up:
var site = $util.getValue('Where_do_you_work');
var submitter = $util.getValue('Initial_Submitter');
if ($util.getValue('Initial_Submitter')== team.findMembersByRole(site+'Approver1'))
$result=team.findMembersByRole(site+'Approver2');
else
$result=team.findMembersByRole(site+'Approver1');
So if the initial submitter equals the approver1 for that site, it will get passed to approver2.
Thank you