We have a team with 3 roles, one role for each "location". The user task is assigned to the team with a filter to choose the correct role, or "location", for approval. Is there a way to assign to a role based on that variable? For example:
Form field variable options: LOC1, LOC2, LOC3
Team Roles: Approve1, Approve2, Approve3
var location=$util.getValue('facility');
if (location= 'LOC1')
$result =team.findMembersByRole('Approve1');
else
if (facility='LOC2')
$result =team.findMembersByRole('Approve2');
else
$result =team.findMembersByRole('Approve3');