Solved

Nintex Forms - Getting the ID from a New Item on a List

  • 24 July 2020
  • 5 replies
  • 552 views

When a new items is submitted on Forms, I need to create a consecutive number as part of the new request code. I'm trying to use the ID number but that number ID is generated after form is submitted. How can I grab that ID number and included as part as a string that I'm using as part of my code? I'm really new with Nintex and still learning Share Point I can't figure out this one. 

Here is the formula that I have on the column but is not getting the "(ID)" number:

=CONCATENATE(SHCCODE,"-",(MID([Type of AR],1,FIND(" -",[Type of AR],1)-1)),"-",(YEAR(Created)),"-",(ID))

Here is the response: HSC-NB-2020-    (Missing the consecutive ID number)

icon

Best answer by allan 27 July 2020, 14:39

View original

5 replies

Userlevel 4
Badge +9
You will not be able to get the ID before submitting your form, simply because the ID does not exist yet.
Imagine having several users posting the form they have open for 10 minutes at the same time, you will not be able to know which number is generated.
With your formula you will have the ID once the form is saved a second time. Otherwise you will need to use a workflow to calculate this number at the creation.

Allan,


Thanks for your response! Totally make sense... I found a solution on a SharePoint block and is to create a new column to duplicate the ID and also create a Flow on SP Designer that will copy the ID as soon as new Item is created and works fine for me. I guess that is another approach.


But your response help me to understand that was not an error on my formula is just the logic that the ID does not exist until item is submitted.


Thanks again!


 

Badge +3

@allan Could you explain how this workflow can be created to have the ID at the time of creation ?

 

Userlevel 4
Badge +9

@nikitapatel Since it’s a workflow on SharePoint, when an item is created, an ID gets attributed. It doesn’t matter if it’s via a Nintex workflow, a SharePoint Designer workflow or manually.
When you first submit a Nintex Form, the item is created, you will the be able to retrieve the ID at the very start of your workflow (with a Set Variable action, for example), or you’ll also be able to use the ID property in the form if the user modifies the item by opening the form.

Badge +3

@allan

If I wanted to redirect the form into edit mode right after the user submits, that wouldn’t be possible right? Because the ID wouldn’t be set right away? 

I have tried doing this by using the Edit Mode URL of the form and updating the redirect link within the submit button using the ID item property at the end of the URL. However, it ends up as ID=

It ends ups as ID blank.

 

Reply