Submit button Confirmation Message with dynamic Number

Badge +3

Hello Everyone,


I am calling external web service using Nintex workflow which will generate ticket number in response.

My requirement is to display ticket number in confirmation message page/Form.


What is the best way to do it.


Also when I set "Configure List Form WebPart Confirmation Message" to true and publish, I am not getting below screen after creating new item..

Do I have to configure something to get this below screen.




Best answer by cju 19 April 2016, 10:57

View original

10 replies

Userlevel 5
Badge +9

The configuration message appears right after submitting the form and before the workflow is executed. As you get the number in the workflow, you cannot display it in this form. You need to get this number with javascript or redirect the user to another page where you can display the last items created by the user for the corresponding list, for example.

The option "Configure List Form WebPart Confirmation Message" works only when you add the form on a SharePoint page with Nintex Forms List Form web part. Is it your case?

Badge +3

Hi Caroline,

Thanks for your reply.

The workflow will add generated ticket number in the same item(ticket column).

When I redirect to custom page eg Page.aspx?id=[id], [id] is coming as null as my page redirect before the item gets created.

Can we query last created ltem's ticket no on custom page using jquery, instead of passing id as query string.I am thinking to set some delay on custom page after redirection. But ticket no may not be correct one if many users submit item same time

Userlevel 5
Badge +9

Sure, you can query the last created item by the current user using jquery.

It's easier to display the item's list using a view which displays only the items created by the current user and ordered by creation date (descending).

But if you prefer retrieving the last created item by the current user using jquery, I can help you performing that.

Badge +3

Hi Caroline,

I am performing this action on public site where anonymous users also submit the request. In this case current user will be null/blank.

I was trying to pass random key (generating using jquery) in query string and save the same value in one of its item's column.

But there is no option to pass variable in Redirect URL.

Userlevel 5
Badge +9

OK, it's more complicated with Anonymous users.

Unfortunately you cannot add form variables or named control in redirect url. But you can vote for this idea : Add Workflow variable tab to Redirect URL Insert reference field – Customer Feedback for Nintex

I think that you can only display the last items created with the title and the generated number in a list view web part and the user will be able to see the item he's just created by identifying it with the title. If in the form the user populates his email address, you can send the generated number by email in the workflow and in the confirmation message you can add text which would say that the user will soon receive an email with the identifier of his demand.

Hope this helps

Userlevel 5
Badge +9

Another idea came to me : you can use the random key that you've generated and stored in the item's column in the session storage :

sessionStorage.setItem('createdItemCustomID', idGen);

Then in the redirected page (which should be in the same site), you can get this random key to retrieve the corresponding item :

var idGen = sessionStorage.getItem('createdItemCustomID');

Hope this helps

Badge +3

Yes Caroline. The same thing I  Implemented last week. But I have used localStorage .

Userlevel 5
Badge +9

That's great that you managed to find a solution to your problem !


I’m having issues for NF to generate an ID number when the customer clicks the "save & submit" button. I'm not JavaScript savvy but I was given this formula to use in the form, but it doesn’t create the ID in the NF form.


Here is the formula I used to create a unique ID like the following. SPS-vhaorlperkic113201782122

strFilename [to show person's AD name, with day, month, year, HH, MM, SS]

concat("Service name File Name", "-", userName(), number(substring(now(), 6, 2)), number(substring(now(), 9, 2)), number(substring(now(), 1, 4)), number(substring(now(), 12, 2)), number(substring(now(), 15, 2)), number(substring(now(), 18, 2)))

So to break this down to make sense: SPS-vhaorlperkic113201782122

strFilename = “Name” in your item below, this is typically the default “Title” column when you create a new list/library

Everything in yellow highlight, is the actual code to create this within InfoPath.

Concat creates the string

“Service name/file name” = SPS

“-“ adds a dash between the Service name/file name: SPS-

“username” = the person that created the entry/request, this is pulled from SP so it is auto generated and cannot be faked: SPS-vhaorljacobj

number(substring(now(), 6, 2)), number(substring(now(), 9, 2)), number(substring(now(), 1, 4)), number(substring(now(), 12, 2)), number(substring(now(), 15, 2)), number(substring(now(), 18, 2)) = how we have to code the SP generated current month, day, year, hour, minute, second: SPS-vhaorlperkic113201782122

I pasted this formula in the "value returned field" save and submit button.

Please advise.

How do you do that?
How do you query the last created item by the current user using jquery
Please advice.