0

For the new values to be added in my list, I have put a column which identifies it's serial number(lets say SRNo).

When a row is created, I manually put "New" keyword in that particular field(not any Id yet).

I Have created a workflow that runs after Item is created in that list.

Here is what workflow does:

  • It checks weather the record has the "SrNo" value set to "New".
  • It then access the another list where I have stored count value for SRNo.
  • It updates SRNo by SRNo + 1 It Replaces the "SrNo" field in both the lists.

This seems fine to update SRNo automatically whenever new record is added. But, the problem I face is when this happen in parallel, it creates duplicates.

There have been cases where two user have added Items at same time and the workflow assigned same SRNo to both of them.

Is there any mechanism where only one instance of workflow works at a time? Is there any way avoid the situation?

1

Enable versioning, add checking out of these records which you want to edit (+1) in workflow check IF the item is CHECKED OUT, if YES, then wait a minute and try again, if NOT do your code (Updating +1) CHECK IN the record.

If they will be more parallel workflows they will do this in serial ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.