I'm looking for a script for Laserfiche Forms that will query a database and pull the next number in sequence and display it as the unique identifier for this document. Once this number has been used, the number should not be used again. This is similar to what the Submission ID is, but from what I can gather, this number is assigned after the submission takes place.
Example: Purchase Order Request Number pulls from SQL Table, P1234, once submitted, this number is no longer valid so the next submission would be P1235.
Thank you in advance for the help!