Skip to main content

Hello All,


I have created an approval process that uses SharePoint InfoPath Form Services to collect data.  After the initiator submits the form for approval and the first approver opens the form, I want the system to generate a unique form number that will be incremented every time a new form is submitted. I also want to start the number count at a particular value, e. g. 3000.   Does anyone have any ideas on how to accomplish this task?


Regards,

SmartObjects to the rescue!


Create a composite SmartBox SmartObject that has an autonumber key field (it might need at least one other field as a placeholder as well).  It only needs one composite method that creates a new row and then immediately deletes it.  It will return the auto generated number.  The table will never have any rows in it because they are deleted immediately after they are created.  You can incorporate this SmartObject into your InfoPath form and have it queried on the appropriate view to get the next number in the series, or you can invoke it in the process with the SmartObject event and set the value into the form.  You can use the SQL Management application to set the starting seed for the autonumber in the appropriate SmartBox table. 


David


Your solution work!


Thank you David. 


The same principle can also be applied to create auto GUIDs.

Reply