Team management is really neat but doesn't quite satisfy a need I have. I have an approval task that I need to be able to assign to the manager of the last user repeatedly until very near the top of the organization chart.
We had some ideas to work around this:
Use Forms hidden fields and lookup rules to get the manager of the current user and use that variable for task assignment.
This works but requires several clunky hidden variables and lookup rules. It also won't work with direct approvals since, without the form loading, the lookup rule doesn't trigger, so the variables don't update.
Use a workflow to retrieve the Manager of the last submitter and set that back to a Forms process variable for task assignment. (This is the one we are leaning toward)
There's still some hidden forms variables but fewer and no forms lookup rules (so this'll work with direct approvals). To do this though we'll need to build a unique workflow for each Forms Process to perform the Set Business Process Variable activities in workflow.
Doing weird stuff with team assignments
Here's a fun one I was personally disappointed didn't pan out: Use javascript in the Team Filters to go beyond what's built in. My boss set up a scheduled script to retrieve Active Directory user info and create a json file, to place on our forms server. This file mapped all the users to their managers. I wrote some javascript to pick up this file, use it to find the manager of the last submitter, and assign the task to them. (We'd have to create some kind of megateam for this to work with everyone in it). This didn't work though because picking up the json is asynchronous and the team Filter script wasn't okay with that. I hit a wall in not finding a way to get that json in there synchronously.
In a similar vein, I suggested giving everyone roles like "John Doe's Manager" and doing something like
$result = team.findMembersByRole( team.findTaskLastSubmitters().pop().DisplayName + "'s Manager" )
But short of directly messing with the Forms database, we didn't see a viable way of maintaining that.
Thoughts? Ideas?
It'd be great if we had something easier to reuse. Or if a feature like this already existed in Laserfiche. If we could put more data on the Users, specifically who their managers are, it'd be really nice to just assign an approval task to "Last submitter's manager" instead of having to jump through all these hoops.