Skip to main content

Hello all, I have a SharePoint List that stores project data, my goal is to have the workflow loop through the list, get the Max project number by department, add 1 and store this value as next available number or possibly create it as a new item in a list of next available numbers. Each department project number series is unique and mostly do not start at 1. The format is 9999-999. left 4 are the department code, and right 3 are the project number we have 305 departments. I have accomplished this using InfoPath and SharePoint Designer basically by grouping by department, converting the right 3 of PJ number to a number, then Max of Pj nuber + 1. I have been tasked to create this same query process in Nintex. So far I have a collection variable (collProjectNumbers), variable (NewProjectNumber and a list query. What I need help with, when the user submits the new form with the appropriate Department and code the workflow will filter on that department only and get the next number. I am new to Nintex and not sure how to tackle this one with the most effective approach.

thank for any help.

Perhaps this article will help you >>> Sequential Numbering in SharePoint with Nintex Workflow 


The article ends at Part 1 and requires a subscription to view part 2, I subscribed and nothing happens? no part 2.


This post might help also: https://community.nintex.com/thread/16964-sequential-numbering


Hi Richard McClanahan‌,

Probably what you can do is to have one list that keeps current running number for all department with 4 columns:

Dept Name - Dept Code - Previous Number - Current Number

And you can create another list for request record purpose.


Whenever a new request on the 2nd list comes, it will look for Dept Code from the 1st list and take the corresponding Current Number.

Combine with Dept Code and create a new project number. Then update to the request item on the 2nd list.

Then update Previous Number column with Current Number value and add 1 to Current Number column.


Thanks for the direction, good approach. I actually have a form library for the request and approval which will trigger the workflow, I will add the "Next Available Number" list and get to work.


If you think your question is answered, please mark this question as answered as this will be helpful for other users of Nintex Connect.


thanks again Abdullah, I have a design that I think will work, I am using InfoPath for the request form and a list for project data, what I may need help with is after the new project is created I need a workflow to query the list, filter or group by department and either sort or get the Max project number and add 1. I am working on that now.


I think it would be easier to configure and maintain if you used two lists, one list for the request and one list for reference. By doing this, you can add new department and its code easily on the reference list.


Thank you for the response, I have this working nicely so far, User submits a request for a new number providing department information from a look up in the form which is a data connection to a list with all departments with department codes. When a new item is created (form submitted) in the request form library the workflow fires and creates a new item in the project inventory list. Then a workflow fires on new item with the above actions. The first variable is the department code which is used to filter the query,  all the projects for that department are stored in a collection variable and sorted Z-A using a number column lPJnumberRight3] then I perform the math to add 1, then I build the sting {Department code} - {NewNumber} then update the blank project number on the current item and the PJnumberRight3] and update the form library request form with the new number like 9999-999. still working on the approval steps. So it seems my choice was to build another list or handle getting the max number using the list query. I will post my final solution once I am satisfied. thanks again I tried to stay with the InfoPath form because I have considerable time invested in the approval process.


Hi , good to know it's working for you.


Hello all, I was very happy with the workflow until I submitted 3 project number requests from the same department, acting as the approver I opened and approved all 3 as close together as possible. Sure enough all three were assigned the same number. What is the best action to use here? the query is grouping by department, then getting the highest number from a calculated column [ProjectNumberRight3]. I need to allow only one instance of the workflow so the new number can be created/assigned then the next new number can be assigned etc... being somewhat new to Nintex it looks like there are quite a few ways to approach this.

I'm not sure if I should have started a new post or continued here


Hello all, well after looking at all the actions and trying a few like "Start Workflow" I ended up adding a pause at the end and it seems to work. So just a quick summary, the work flow that creates the new number was querying a calculated column, the calculated column was converting the Right 3 of the current highest project number to a number. The Issue was when the same department submitted multiple requests for a new number and the approver approves all 3 in say a minute or so (a real scenario) the work flow was assigning the same number to all 3. In the actions below, a new custom ID is created and a new project number is created then it pauses.

 


Reply