Set Form Visibility Based on Task Assigneeship?

cancel
Showing results for 
Search instead for 
Did you mean: 
mgundrum
Active Member

Set Form Visibility Based on Task Assigneeship?

Jump to solution

Alfresco Process Services, Enterprise v1.5

One of our Processes looks like the image here, with two consecutive User Tasks referencing the same form. In the form, the majority of the tasks are completed by the Support team, and after they complete their task, the Asset Management task is assigned to a group of 4 candidate users who complete a much smaller subsection of the same form. Ideally, this subsection would only be available to the Asset Management users - the visibility of the fields dependent upon whether or not one of the 4 candidate users is the current Task assignee, otherwise the fields are hidden. Is there a way to complete this on either the Form or Process Editors, or a way to pull a 'current task assignee' variable into the Form Editor? Perhaps some sort of Javascript event on FormRendered. Thanks in advance for your insight. 

1 Solution

Accepted Solutions
cjose
Senior Member II

Re: Set Form Visibility Based on Task Assigneeship?

Jump to solution

Adding some custom logic in form rendered is an option. You can make a task details api call (using form.taskId) to find-out the assignee of the task and compare it with the current logged in user scope.$root.account.id. Then hide or show the field using javascript.

Ciju

View solution in original post

1 Reply
cjose
Senior Member II

Re: Set Form Visibility Based on Task Assigneeship?

Jump to solution

Adding some custom logic in form rendered is an option. You can make a task details api call (using form.taskId) to find-out the assignee of the task and compare it with the current logged in user scope.$root.account.id. Then hide or show the field using javascript.

Ciju