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

Question

Question

Assigning Approval Task to to User

asked on March 23, 2020

Hi,

I have an approval form. The initiator completes the form and then from a lookup field, chooses the name of the approver. Upon submission, the task should be routed to this approver.

I created a team that contains the names of all the initiators and the approvers for this form.

There are 4 different approvers, one for each department.

The idea I want to implement is to have the form check if the name in the lookup field is equal to an approver name in the specified team. If the evaluation is true then the task should be routed to that approver.

 

Is there a way to apply this? Thank you..

0 0

Answer

SELECTED ANSWER
replied on March 24, 2020 Show version history

Here are some instructions to follow

Set up the Drop down Field

Using the Drop Down Field values to create Roles in Teams (Dept Routing is the name of my Team). I had used DeptRouting as the variable name of my Drop Down. Sorry for the confusion

Assign Teams to Task

Create Filter ('DeptRouting') in this example is the variable name for the drop down choices on the face of the form

$result=team.findMembersByRole($util.getValue('DeptRouting'))

 

0 0

Replies

replied on March 23, 2020

Hi Wissam

In your Teams setup, if you create Roles for each of the Departments, and assign your department to each of the appropriate users. Rather than having the Operator chose the Approver, they could just pick the Department, and using a Filter with Teams, you would have it routed to the Department User Automatically.

The other benefit of this, is as the department approver's change over time, you only have to update the users in Teams, and not on the face of the form. Also easier to train new staff who may not know who the users are, but can identify the department the task should be routed to

0 0
replied on March 24, 2020

Hi Steve,

Thanks for your message. The concept that you described is the best scenario. 

I have 5 roles created in my Team.

  1. Department A Approver
  2. Department B Approver
  3. Department C Approver
  4. Department D Approver
  5. Request Submitter

Originally, I created a field that looks up a manager name from a data source. The Request Submitter will complete all fields and then, using the lookup field, pick the name of the approver from the data source then submit the form. During the next approval step, I wanted to use a filter to match this name with the name of an approver in the Team that I setup. The problem I have is that the filter does not work. The form does not recognize the value captured by the lookup field. This prevents me from having a working filter.

I can change the field so that instead of picking up the name of the approver, the Task Submitter will choose the department. But in this case, do you have any idea about how I can create a working filter? I am not an expert on Java Script, so I am learning as I go.

 

Thank you.

0 0
SELECTED ANSWER
replied on March 24, 2020 Show version history

Here are some instructions to follow

Set up the Drop down Field

Using the Drop Down Field values to create Roles in Teams (Dept Routing is the name of my Team). I had used DeptRouting as the variable name of my Drop Down. Sorry for the confusion

Assign Teams to Task

Create Filter ('DeptRouting') in this example is the variable name for the drop down choices on the face of the form

$result=team.findMembersByRole($util.getValue('DeptRouting'))

 

0 0
replied on March 24, 2020

It worked. Thank you Steve.

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

Sign in to reply to this post.