I have a list with a workflow which creates a task when an item is submitted. I would like to restrict the permissions on that task, so that only the manager - specified in the submission form - can complete and submit the task.
At workflow start I'm creating a variable "Unique Task Name", which is a name suffixed with the list item ID, and then I'm using that variable as the Task Title, so that I can determine which task in the task list is associated with the current item. I'd then like to say, "Set the permissions for the task in the task list whose name = Var "Unique Task Name" to "Edit" for the manager named in the submission form".
My questions are:
1. I'm confused by the Query builder in the Update Item Permissions action, because if I select another list, the resulting format implies that a value needs to equal something AND that resulting value needs to equal something else, when what I want to say is, "if the task name in list Restricted Tasks = Var "Unique Task Name" then...".
2. If I can get this to work, my thought is that I can run the Update Item Permissions action in parallel with the Assign a task action, with a 1 minute delay to ensure the task is created before the action attempts to update the permissions. Is this the best way to go about this?
Thanks Simon. Any thoughts on my second question? I realized that my proposal isn't ideal, as if someone opens their task email and then task straight away - i.e. before the Update Item Permissions action has run - then they're not going to be able to complete their task. Is there a better way to do this?
Think I've answered my own question: if I put a Loop in a parallel with a condition that checks a variable set to "No" as default, and in that loop a Run If which runs when there's a task with a name = "Unique Task Name", updates the task permissions, and also updates the variable to "Yes", then (in testing) this cuts the time for the task permissions update from 1m 30s to 30s.
I'd still love to hear any other options!