You are viewing limited content. For full access, please sign in.

Question

Question

Unique number to each submitted Form.

asked on August 19, 2014

I need to assign a unique number to each submitted Form and display it to the forms user. 

The idea is that after the form is submitted, Laserfiche forms should retrieve from a SQL the current form number, and update it (+1) so it will be ready for the following user and at the same time, display the assigned number to the user. 

 

The problems I have:

1. I can't display the assigned number to the user with a Token on the "Thank you" message.  The only way I have been able to do it is on another form on the following step of the process which is not comfortable for the users. 

2. If two users submit forms at the same time, sometimes both of them will be assigned the same "unique" number because forms is slow to update it.

 

Any ideas or suggestions?

0 0

Replies

replied on August 20, 2014

Can you not use the Instance ID? That would be unique per the instance of the form and already a token in Forms.

 

Also, this is a perfect place for a stored procedure. I would try to see if you can configure a stored procedure to look at a database and store the Instance ID and get back another column that is going to always be unique. You will be able to display that immediately in the starting form. 

 

If you are worried about this causing an issue where you have many entries in the SQL DB that never got submitted, you will need to handle this in a multiple step manner. You will want to keep track of the Instance ID and add another column to this table to store the status, as well as date and time. You can configure a workflow to check up on the status of the form, like when the first form is submitted, a workflow updates a column to indicate it's been submitted, and the workflow on a scheduled basis would remove entries that are past 24 hours without being submitted (or however long you decide).

4 1
replied on August 28, 2014

Thanks for your help, It showed me the way.

I couldn't do it with the InstanceID because the token is not available on the first form, so I created another SP that returns a unique Identifier to each submitted form (Incremental) and the second SP creates the proper Unique number that we need with the required format.

Thanks

0 0
replied on December 20, 2021

Hi Bernard, when you have time could you please let me know the whole process, I would like to do the same thing. Thanks in advance.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.