For the assignment back to the team, a filter like this should work.
This loops through each row of the table and adds the user from that row if the date field is blank.
var users = $util.getValue('table_variable','user_variable');
var complete = $util.getValue('table_variable','date_completed_variable');
var assignment = [];
for (var i = 0; i < users.length; i++) {
if(complete[i] == '') {
var user = team.findTeamMembersByUserName(users[i]);
assignment = $util.union(assignment, user);
}
}
$result=assignment;
As far as the gateway is concerned, you should set the path that exits the "loop" as the default, and the path that leads back into the task with an option like this:
/dataset/table_variable/date_completed_variable=""
A gateway like that with a table will evaluate as true if any row in the table matches the criteria, so it'll keep taking the path back to the task until every one of the date fields is complete, at which point that path will no longer evaluate as true, and it'll follow the default path out of the loop.