Workflow (Office 365) check if an item in another list has been checked out

  • 12 February 2015
  • 5 replies
  • 1 view

Badge +4

Hi,

I have a list (call it List A) with a workflow that runs when a new item has been created.

As part of the workflow, an approver will be assigned a task which will in turn update items in another list (List B)... so far so good. 

Users are able to create multiple items in List A, that can update the same item in List B.  So when an approver were to approve all tasks related to a specific item in List B, it may have conflicts and incorrect data.  (The data field keeps a count).

Real life example is this:

Leave request.

- John Doe submits three vacation requests, each request is for 3 days, 5 days, and 7 days of vacation to be taken.

- John Doe's manager is assigned the task to approve the three requests, and in turn, the manager approves all three requests back to back within a minute.

- the approved request will run a workflow that will update John Doe's Leave Profile, which contains a count to see how many vacation days he has taken based on all approved requests.

The Problem:

I am finding that the values being counted in the Profile is not getting and setting the correct numbers, due to conflicts of when each task will run and update the workflow.  The first request will update the profile, but the 2nd request will update at the same time, and thus not capturing the first request.

i.e.

1. In the Profile, the count for number of total vacation days taken is initially 0

2. Request #1 is for 3 days, and will update the Profile to 3.

3. Request #2 is for 5 days, but instead of updating the profile AFTER Request #1 has done updating it, Request #2 will update the profile to 5 -  which is obviously wrong since it should be 8.

The potential solution I am thinking is to have in the workflow to check out the Profile as soon as one of the request starts to update it.  So do so, I need to check if that Profile item has been "checked-out", if it is, then it needs to wait until it's checked back in.

Is this something that can be done in Nintex Workflow for Office 365?


5 replies

Badge +4

This is still not answered sad.png

Userlevel 6
Badge +12

Hi Suolon,

Try using the Query List or Office 365 Query List action to retrieve the item and return the "Checked Out To" column value.  Alternatively you could use the same query list action but make "Checked Out To" a search filter.  If it returns zero results, you know it's been previously checked out.  Then you'd need to loop until is isn't checked out any more.

Cheers,

Chris

Badge +4

Hi Chris,

Thanks.

I will try this out and let you know how it goes.

Badge +4

Hi Chris,

My list is a Custom List and does not have CheckIn/CheckOut capabilities (that feature is only for Document Libraries).

Even if I were to create my own CheckIn/CheckOut, I will still encounter the same problem where two workflows can potentially edit the same item at the same time.

Badge +4

Hi Robyn,

That wouldn't work either, since that is no different than the CheckIn/CheckOut column.

The issue is that when two workflow instances both try to access the "flag" and both sees that it's not set, bothe Workflow will set it and continue to process what it needs to do.

Reply