cancel
Showing results for 
Search instead for 
Did you mean: 

Set Form Visibility Based on Task Assigneeship?

mgundrum
Champ on-the-rise
Champ on-the-rise

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 ACCEPTED ANSWER

cjose
Elite Collaborator
Elite Collaborator

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 answer in original post

1 REPLY 1

cjose
Elite Collaborator
Elite Collaborator

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