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

Question

Question

Forms - Dynamic Approvers

asked on February 9, 2023

Hi All,

 

I can see this was kind of asked here - https://answers.laserfiche.com/questions/120951/Forms--Assign-a-task-to-a-team-of-people-who-approve-and-that-everyone-can-approve and I was just wondering if there is any easier/native way of handling this.

 

So the scenario is, there is something which needs to be viewed and approved by multiple people, but it's not the same people every time, this changes dynamically in each instance.

So you could have multiple approvers (in this instance it's a choice of 10 people) and every one of these needs to approve the document if their box is checked:-

E.G.

 

I can't see an easy way of doing this currently in forms, without having to write some complex logic in the background to handle this. 

 

If this isn't easily possible (and/or I've missed something) please can I raise this as a feature request?

 

Cheers!

Chris Douglas

0 0

Answer

SELECTED ANSWER
replied on February 9, 2023

Yeah, that's the sum of it.  That other post you linked had a lot of people asking for a built-in way to easily do multiple simultaneous assignments via a single user task/assignment, but I've never seen or heard anything about that becoming a viable solution.

I think the second option I posted, using a table and removing the values once complete, might be the easier option to implement, but it does still require complexity to maintain those table values.

I wish I had a better suggestion for you, but I don't know any.

Good luck.

0 0

Replies

replied on February 9, 2023 Show version history

First question to decide - do you need all of these approvers to be able to review and complete the form/approval at the same time or is it acceptable to only do one at a time?

 

If they all need to do it simultaneously, then you're likely going to want an Inclusive Gateway with a path evaluating each possible option on your form and leading to a user task.  This means that multiple user tasks are active simultaneously.  Your Process Diagram looks pretty complex this way, but the actual decisions are fairly simple to set-up, just one decision for each path out of the Inclusive Gateway based on one value each on your form.

 

If they can take turns, then you can make your Process Diagram look simplier, and the complexity is shifted into the filter being evaluated on the user task.  In this case, you keep assigning the user task back to the team.  After submission, it hits an Exclusive Gateway that checks if all approvals are complete, and if not it follows a path back to the user task, in this way ensuring it keeps going back to the team until all required approvals are complete.  The complexity is in that decision for the gateway and the filter on the task.  This will definitely be pushing up towards the 1,000 character limit of the filter field, so I usually keep variable names short and minimize use of white space when writing Javascript for filters (they're less readable, but I've hit that 1,000 character limit on a few occassions). 

 

Here's an example of the latter one that I use on a form.  In this form, I have several fields that run a calculation to determine the percent complete of each section.  There is also a total complete percent field.  The Exclusive Gateway that evaluates whether or not to return to the user task or proceed towards finalization is just looking at that total percent complete field, and if it is anything less than 100% complete, it sends back to the user task, so its decision is fairly simple.  But when we get to the user task, it needs to decide who to assign to based on the percent complete of each section.  This filter looks at the field for each section to see if it is less than 100% and includes the Role for that section if it is less.  There is an assigned user on the form that is always included (the dpoc variable), so eventually it works its way down to only that one user is assigned.  In this code, you see that there are variables for each section that start empty and only get populated with the users in a particular role if their section was less than 100% complete.  At the end it combines all of the assignments into a single result.  This has been working great for many years, since version 10.2.  

var doc = '';
var bo = '';
var ap = '';
var sec = '';
var sr = '';
var dpoc = team.findTeamMembersByUserName($util.getValue('dpoc_username'));
if ($util.getValue('percent_complete_documents') < 100) { doc = team.findMembersByRole('Documents Review'); }
if ($util.getValue('percent_complete_backoffice') < 100) { bo = team.findMembersByRole('Back-Office Review'); }
if ($util.getValue('percent_complete_assetprotection') < 100) { ap = team.findMembersByRole('Collections Review'); }
if ($util.getValue('percent_complete_securian') < 100) { sec = team.findMembersByRole('Securian Review'); }
if ($util.getValue('percent_complete_specialreview') < 100) { sr = team.findMembersByRole('Specialty Review Team'); }
$result=$util.union(dpoc, doc, bo, ap, sec, sr);

 

The same kind of logic should work for your form, start with empty variables, and populate them if the appropriate fields on the form are marked, and they do not show complete.  My only worry is with up to 10 possibilities, you are really gunna be pushing towards that 1,000 character limit, and might need to get a bit creative.

1 0
replied on February 9, 2023

Another idea with the option that reassigns the user task back to the team...

You could also use Javascript, formulas, or Workflow to populate the list of users into a table (it could be hidden on your form), and remove them from the table as their part is completed.  Then the filter on the user task can just assign to the users on the table, like this (table variable in this example is multi_assign_table, and the field within the table is multi_assign_user): 

$result=team.findTeamMembersByUserName($util.getValue('multi_assign_table','multi_assign_user'));

 

1 0
replied on February 9, 2023

Thanks Matthew, I'll take a look at the above.

 

I think the short answer is, this isn't possible without some fairly complex logic in the background.

 

It will probably just be easier to use a 3rd party product to complete this (like DocuSign) which offers this functionality natively.

 

Cheers!

0 0
SELECTED ANSWER
replied on February 9, 2023

Yeah, that's the sum of it.  That other post you linked had a lot of people asking for a built-in way to easily do multiple simultaneous assignments via a single user task/assignment, but I've never seen or heard anything about that becoming a viable solution.

I think the second option I posted, using a table and removing the values once complete, might be the easier option to implement, but it does still require complexity to maintain those table values.

I wish I had a better suggestion for you, but I don't know any.

Good luck.

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

Sign in to reply to this post.