Using a Task ID or similar to set fields in Workflow Task List

  • 29 August 2019
  • 2 replies
  • 2 views

Badge +3

Hello. I have a number of different flexi-task approval workflows running on different document libraries. When users upload a new document into the library, they are able to select from some look up columns on a master property list to help tag the documents with relevant metadata. The workflows are kicked off manually when appropriate. What I would like to do is to capture that data from the lookup fields everytime a new workflow is run and display it with the created task in the Workflow Task list to give us a better way to sort and filter the task lists. I tried first doing this with a simple workflow in the task list that sets a field value whenever a new item is added but I think the way to do it would be to use Update Item from within the flexi task workflow itself.  This is where I get lost. I can't figure out the "where" logic to update the newly created task. I tried storing the task ID's in a collection variable but I'm unable to reference it in my update item action and I'm not even sure if Workflow Item ID is the correct property to be targeting. Any help would be greatly appreciated.

 

Thanks,

Carl

4170iA6288105FB8B039D.png

 

4171i94B343E8F30E6A27.png

 

4172i848032BF7E4CA2D3.png

 


2 replies

Userlevel 6
Badge +22

Hi,
The explanation of the required solution is to update the newly created Task.
In the screen shot the update item action is coming after the task creation which means the task will not be updated until the task has been actioned which would be some time period after the Task is created.
If this is what you want just use a for each action to retreive the ID from the collection and then feed that variable into your Update Item action.

If you do want to update the newly created task you can use a parrallel action and have your task on one branch and an update item on the other. Unfortuntely the Task ID variabe is not populated when the task is created. It is only populated when the task has been completed. To find the task in the task list I usually make my Task Name dynamic and then I query the task list looking for the specific Task Name and retreive its ID and use that in the update item action.

Nintex does not recommend running Workflows directly on the task list as this can cause issues such as Task Locking.

Badge +3
Hi Simon, thank you so much for the reply and I apologize for my delayed response. So based on your last sentence, it sounds like I should just avoid this altogether? Is there a common, more elegant solution to creating more data rich workflow task lists?

Thanks,
Carl

Reply