You are viewing limited content. For full access, please sign in.

Question

Question

Return Result of Nothing from Javascript Filter

asked on February 5, 2020

I am trying to get my Javascript Filter to return a default result of nothing in certain scenarios where I do not want a task assigned to a specific user within a team but in other scenarios I do. 

Is there a way to make this work? 

Currently the task suspends when an empty array is returned from the javascript filter.  I would expect this to just default to assigning to no one within the team.

 

var needsSigned = team.findTaskLastSubmitters(4);
if (needsSigned.length > 0) {
  /* if previously signed by MFG leave it assigned to whole team */
  $result = [];
} else {
  var createFormSubmittedUser = team.findTaskLastSubmitters(14);
  if (createFormSubmittedUser && createFormSubmittedUser.length !== 0) 
  {
      $result = createFormSubmittedUser;
  } else {
      $result = team.findTaskLastSubmitters(15);
  }
}

 

0 0

Answer

SELECTED ANSWER
replied on June 2, 2020

The fix was to return all users in the team, instead of a blank array.  This allowed the task to be assigned to the whole team so anyone could pick it up.

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.