Hi, I have a requirement to assign a task to same team member who submitted previous task step. Using dynamic team filter, I have written below script.
var APSubmitter;
APSubmitter=team.findTeamMembersByUserName($util.getValue('AP_Submitter'));
if (Object.keys(APSubmitter).length == 0)
$result=team.getAllMembers();
else
$result=APSubmitter;
Where 'AP_Submitter' is a hidden field on form that I set by invoking a workflow every time a task is submitted in order to catch last submitter. Is there a way to use Process Variables instead within a dynamic filter javascript to get previous task step submitter?
I mean the below process variables to get the Previous Submission or Previous User Submission, which are not available in dynamic filter to pick.
Kindly note that I don't want to use findTaskLastSubmitters(StepID) method because there are multiple tasks based on conditions within a flow and I can't hard code the StepID.