Auto Populate a case number on the form each time a new form is filled out.

  • 26 February 2020
  • 5 replies
  • 19 views

Badge +3

I have an inspection report that used to be done on a form that had an embossed case number at the top of each form.  I need to figure out a way to autopopulate a number on the nintex form, so that they have a reference when they do write ups and other parts of the inspection.  I am new to Nintex and have researched everything that I could and I can't figure this out.  I need step by step instructions! LOL!


5 replies

Userlevel 6
Badge +22
Unfortunately there is no way of doing this without risking duplicates by two users filling in a form at the same time.

Users have done this by creating a calculated value control on the form that looks up the list to find the last item ID and then constructing a unique number from that. The issue here is that the lookup runtime function is only limited to around 1000 returns so any more than 1000 items in the list will stop this from working.

The second method is to generate the number with a workflow by looking up the next number and then incrementining it by one.
The existing number can be shown on the form and after submission a workflow updates the number so the next form will have a new number. The calculated value control will have to be configured to only calculate in new mode and not edit or view.
Badge +3

Since I am really new to Nintex can you show me how to do the second method in the workflow.  I need examples and pictures if possible please.  Thanks so much.

 

Userlevel 6
Badge +22

Create a List that keeps track of your case number and add the first number to it.

The number column is of type Number.

6628iB84EC3E242E0C0B7.png

Create a List that will hold your Inspection reports.

Create a column called Number to store your Case Number.  Make sure it is data type Number.

6629iD98FB77A214EC418.png

Create a Nintex Form.

Delete the Number control on the form and replace it with a Calculated Value control.

6630i909BE216AC0B1F35.png

The calculated value control will look up the case number from the case number list using a Lookup() runtime function. It will be connected to the Number column on the Inspection List. Note: Make sure you set Recalculate on New Mode set to Yes and Edit and View mode set to NO.

6634i340CE96B51272064.png

Creating a new form shows a case number and submitting it writes it to the inspection list.

6632i17F1C81485D6DCFC.png

6635iDEE7E04A40D63B8A.png

Create a worflow that starts on Item creation that looks up the current Case Number and increments it by 1.

6636i302F7D6DECE19EBF.png

Math Operation Configuration. Note that the variable being used is of type Number.  It looks up the current case number and increments it by 1 and saves it into a variable.

6643i4B18D248269B3AFF.png

The update item action updates the case number to the new case number on the Case Number list.

6638iBCC8020E1DB1871C.png

Start on item creation setting.

6639i1FA598C70CC0E5A1.png

When a new item is added the workflow starts and updates the case number ready for the next form.

6640iC1F21F6EC9532A9F.png

Next new form that is opened will have the new number.

6642i94BD09960FF5621F.png

And so on.

 

 

Badge +3

I did everything you said, but the calculated value won't work.  How can I connect it to the case number list if the form is using the inspection report list?

Userlevel 6
Badge +22
You connect to the case number list from the Inspection list using a lookup as per the 4th screen shot in my previous post.

If you need assistance with your forms and workflows you can consult a Nintex partner. You can find a partner here : https://www.nintex.com/resources/find-a-partner/

Reply