capture the date item was approved


Badge +7

Hello,

I have created a PO requisition system in SharePoint and I use the Nintex workflow. This is an on premise installation.

In the workflow I have used the Assign Flexi Task through out so that people get notifications asking them to approve or reject the purchase order.

What I have been asked to do now for auditing purposes is to capture the date when the person either approved or rejected the purchase order.

My questions are as follows:

1. Does Nintex capture this information?

2. If Nintex captures this type of information where does it store this information?

3. If Nintex stores this information how can I get this information pushed into a column in the SharePoint list that I have created for purchase order requisitions?

Any assistance would be appreciated.


12 replies

Userlevel 6
Badge +16

I think you are making it in the right way.

Currently you have not a method to get that information.

Another way to do that is storing the task id and then query the task list to get the modified field (modified date)

Userlevel 6
Badge +12

Hello -

This is entirely doable using Nintex, just need to update the current item (in your list column) after the flexi task has been approved/rejected in your workflow.

How many approvals does an item have to go through? If there are multiple, you need to be careful as you will overwrite each time, but if there is only one approval or you are only looking to see the last approval/rejection, this should not be an issue.

Let me know if you need anything else and I hope this helps!

Userlevel 5
Badge +9

Jesse is absolutely right !

I often do that in approval processes and here's how I implement it :

  • Create a datetime column in the list or Library
  • In approval workflow, after the flexi task action, in approved and rejected branches, I get the current date and time using a "Set variable" action, setting a text variable like explained in this post : https://community.nintex.com/message/20004#comment-20004
  • After the approved and rejected branches, I update the current item to set datetime column created in the first step with the text variable

If there are several approvals, you can use a repeating section in the form and connect it to a multiple lines column. Then in the workflow, you can build the XML which will then be correctly interpreted by the repeating section and update the multiple lines column using the XML you've built. This blog will help you building the XML : Populating Repeating Section Controls with List Data

Hope this helps

Userlevel 6
Badge +12

Hello Sean Docherty​ -

Were you able to get a working solution for this? Let us know if you need any help and post what you did here!

Userlevel 6
Badge +13

I would go with Fernando Hunth​ 's suggestion here. Definitely more reliable to store the tasks ID in a variable, and then query the task list to find that task and look up the modified date and store that into your date field in your item.

Badge +7

Hello Caroline,

Thank you for your response. I went through your steps and it worked perfectly.

In my case I have two different approval levels depending on the dollar value of the purchase order that someone is submitting.

What I did differently from your instructions is the I created two additional columns in my SharePoint list:

- AppDate1 - Approval Date 1 - this captures the date and time from the first level of approval

- AppDate2 - Approval Date 2 - this captures the date and time from the second level of approval

I created two text variables - txtAppDate1 & txtAppDate2 to capture the Current Date and Current time (as per your article 20004)

and then had the information update the two columns.

These two columns were then added to an Admin View of the PO list and behold the date and time was captured successfully in the correct column when I created a test PO.

Thank you for your help.

Userlevel 5
Badge +9

Hi Sean,

I'm glad that I could help you.

Your solution is great.

Thanks for your feedback, I think that it will help others.

Badge +3

I also thought about doing that. Although I have stumbled upon a big issue. How do you capture a date when someone approved something if there are multiple approvers (creates individual tasks for each user) within one Request Approval action? I tried substracting the number of users (3) from the Request Approval  ID to get the one if the possible task IDs, and then use Query list action to query the Workflow Tasks list for a task with ID > or = to my ID-3 variable that was assigned to this user and that has a status of Completed.... There is something missing, however. The best I could make was to get two dates of the three, the third one is always blank sad.png Is there an easier way???

Userlevel 5
Badge +9

I answer maybe a bit late but you have another option : you can query the Workflow Tasks list with the following filters to get all tasks related to the current workflow instance :

  • Workflow Instance ID is equal to (you can insert a reference and in Common tab select Workflow Instance ID)

Hope this helps

Badge +3

Thank you so much for looking into this! I did have to revert back to the workaround the workflow had originally. Three individual tasks, all identical, and then a couple of queries and run-if statements to force complete the remaining tasks. It was a nightmare, but it seems like it's working right now. The query to find that one task consisted of four filters: workflow name, title contains (yes, I had to put the position of the approver into the task name), status not complete, and something else I forget... which could be redundant but I put it anyhow. Oh the growing pains happy.png

Badge +3

Oh, and the date part was easy. Since there is one single approver on the task, it's the "update date when action was executed" straight after the approval.

Userlevel 5
Badge +9

OK, I trust you when you say that it was a nightmare wink.png. Thanks for your feedback happy.png

Reply