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

Question

Question

need assistance to assign automatic work order number

asked on July 22, 2019

i have specific request from my user to create a work order form and assign number to it automatically as soon as user submit request.

i need to assign number as per request 2019 or 19 to start with the year and it changes so on once it change the year. and number can start with 0110 and so on. so it should assign work order # 190110,190111,190112 and so on.

 

if anyone has already been through this process please let me know how can i assign number to my form.

0 0

Replies

replied on July 22, 2019

First I would suggest that you create a table in the SQL database for storing some information. This does not have to contain a lot of information, but one of the fields does need to have the identity specification set to yes, the identity increment set to 1, and the identity seed set to 190110 or 20190110.

Next create a Workflow Service Task as the second step (right after the Start event). In the Workflow Service Task make sure that the Wait for the workflow to finish before proceeding is set to Yes. You will also want to have the field/variable that the data is going into already in a form, even if not used at all.

From there create a workflow. Give it the same name as in the Workflow Service Task in Forms. The workflow should at a minimum insert data with the Create Identity Token and Set Business Process Variables. I like adding other information to the SQL table so that I can do some reports or checking data to make sure everything is working right, so would include a Retrieve Business Process Variables to get that data.

Make sure to set the Work Order Number to the newly created ID of the new row and publish. When publishing you do not need to setup any conditions or schedule.

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

Sign in to reply to this post.