Generating a Random Number in the Legacy Builder

Have more questions? Submit a request

If your process requires a unique Submission ID at the start of the Submission instead of at the end when the Submission ID is generated, multiplying a date and time field is an easy workaround.

Random Number Generation

Creating a unique number generator takes only three fields and a few easy steps.

Configure the Fields

  1. Add a Date field to the center workspace and label it "Hidden Date."
  2. Add a Time field and label it "Hidden Time."
  3. Add a Calculation field and label it something like, "Unique Number Generator" or "Submission Number."
  4. Select the date field to open Field Settings in the left panel, expand the More drop down, and uncheck Mobile Visible.LB_Unique Number Generator_Hidden Date_Mobile Visible.png
  5. Select the time field to open Field Settings, change the Style to HH:MM:SS, and leave the Default Value as "Current Time."
  6. Expand the More drop down, and uncheck Mobile Visible.LB_Unique Number Generator_Hidden Time_Field Settings.png
  7. Select the calculation field to open Field Settings and select Create Calculation.LB_Unique Number Generator_Create Calculation.png
  8. If these are the first and/or only fields in your form, the Operator 1 and Operator 2 will automatically default to the date and time fields. Otherwise, expand each drop down to select these fields.
  9. Hover over the addition sign to expand the functions list and select multiplication.LB_Unique Number Generator_Create Calculation_Multiplication.png
  10. Toggle to the Format tab to adjust to No Decimal Places. Select Done to save changes and close the modal.LB_Create Calculation_Format_No Decimal Places.png

How it Looks

Once you Save and Publish, the result on mobile will look like this:

iOS_Unique Number Generator.png

How it Works

The number generated isn't truly random; it is always going to be a product of the date and time, converted into an integral numeric string. While it is technically possible for the number to duplicate between different users, they would have to generate the number within the same second and date to have an identical number.

Pair with Dispatch and Workflow

If this number needs to be received by the office admin before the job, one way to do this is to use Dispatch and Workflow. The dispatcher in the office can generate a submission, dispatch it to themselves, check their device to get the number, and workflow it to the person who will be completing the job. If you are using Bulk Dispatch, remember to make sure the time is different for every submission to truly generate a unique number for each submission.

Did we answer your question?

Please let us know by voting below. All we ask is if you downvote, please let us know how the content can be improved in the comments!

Articles in this section

Was this article helpful?
0 out of 0 found this helpful
Share

Comments

0 comments

Please sign in to leave a comment.