Save delegated name in a variable

  • 12 January 2017
  • 7 replies
  • 3 views

Badge +7

If a task is delegated to another person, can I save that name in a variable for future use? If so,  How do I go about doing that?


7 replies

Userlevel 6
Badge +12

Hi Susie,

Yes you can do this.  The actions that allow delegation always records who the action was last assigned to.  In the case of a delegated task, the delegated person is still the assignee so all we have to do is query the task once it has been completed.  I'll use the flexi task as an example.

For start, you must record the task ID into a variable:

My example assumes there's just one task so I just used the variable type "List Item ID" but you can handle multiple tasks using a collection.

Now that you know the task ID, you can use the query list action to query task list to find that task:

Now you've got the delegated person's name in a variable and you're good to go.  Please note the name is stored in that lovely internal format so the next step depends on what you want to do.  If you wanted to format their name nicely then check out this post.

Cheers,

Chris 

:

Userlevel 5
Badge +14

or you can look at LastTaskRespondent reference

Badge +16

that's what I have recently implemented on my own workflow ‌ for delegation happy.png

Userlevel 4
Badge +10

Hi Susie,

's idea should work. I use this sort of method. I also use it to get the name of the approver when I am assigning the task to a group. Otherwise the approvers name shows up as the group name.

Regards,

Patrick

Badge +7

Thank you for the responses. Please bear with me as I am new to Nintex/SharePoint.

In Chris's example, in the Configure Action - Query list screen, I added the Filter ID is equal to varTaskID.  But in the section under sort, I do not have the option of "Assigned To*" on my screen.  Am I using the wrong action?  Here is what it looks like

197594_pastedImage_1.png

Badge +7

Hi - I figured out the answer to my last question.  I didn't realize I had to select "Assigned To" in the Field drop down and add it.  Thanks for everyone's help!

Userlevel 6
Badge +12

Our pleasure and glad you figured out the Assigned To bit!

There are also some common references that may assist you depending on what you want to do.  Marian already pointed out one.  Also check out All Approver Comments/Approver Comments and Last Task Respondent Display Name.  Try using them in an email after the action has completed and check out what they do.

Cheers,

Chris

Reply