cancel
Showing results for 
Search instead for 
Did you mean: 
chubacher
Nintex Newbie

Form creating two of the same Issue ID

I have a list called an "Issue Log" that users fill out a form to log new issues with. I have a field in the form called Issue ID that is connected to a column of the same name. Not sure how but I have ran into a problem where it is creating duplicates of the same Issue ID. This doesn't always happen and seems to be at random. The workflow is set up to Query the list and store the results in a variable called "nextNumber">then I set a variable "prefixedNextNumber equals value fn-padLeft(nextNumber4,0)" then I build a string I-{WorkflowVariableSmiley TonguerefixedNextNumber} and then set a field value of Issue ID equals WorkflowVariableSmiley TonguerefixedNextNumber, I do a math operation calling on Workflow Date nextNumber plus 1 and store the result in another variable called nextNumberPlus1, I update the item in Master Numbering List-Issues, set variable to prefixedNextNumber list look up current item Owners and lastly set the variable textAssignedTo list look up current item Owners before requesting approval

0 Kudos
Reply
2 Replies
mlauer
Nintex Newbie

Re: Form creating two of the same Issue ID

You can get a unique ID by creating a new list item and using list item ID not by updating a counter in a list item.

By creating a new list item you get a 1-based integer ID, which is one greater than the ID of the item that was previously added. If the item is deleted, its ID is not reused (see https://msdn.microsoft.com/EN-US/library/microsoft.sharepoint.splistitem.id.aspx ).

Reply
Automation Master
Automation Master

Re: Form creating two of the same Issue ID

the reason is not random.

the reason is that more then one user (or event) are about to create new entry at about the same time. so they both/all see the same value of the counter at the beginning.

there is no other reliable way in sharepoint to get unique identifiers then to rely on item ID.

for your simple case I'd recomend that you update issue-ID with workflow started once the item is creted.

Reply