This article provides step-by-step instructions for using Date, Time, and Calculation fields to create a random number in your form.
Admins and Designers can build this solution into an Advanced Form so that a unique Submission ID is generated at the start of a submission, rather than after the submission is complete.
Random number generation
Creating a unique number generator takes only three fields and a few easy steps.
Configure the fields
Field can be added to an Advanced Form using drag and drop, click to add, or Smart Field recognition, regardless of Account View:
- In the left navigation, click Forms.
- On the left side of the page, in line with the form you wish to edit, click Edit to open the Advanced Form Builder.
- Add a Date field, Time field, and Calculation filed to your form using your preferred method.
-
Label the three fields:
- The Date field, "Hidden Date"
- The Time field, "Hidden Time"
- The Calculation field, "Unique Number Generator" or "Submission Number"
-
Select the Date field to open Field Settings in the left panel:
- Style defaults to MM/DD/YYYY
- Default value will be Current Date
- Expand the Advanced menu and click to turn off Form Visible to hide the field from users completing a submission.
-
Select the Time field to open Field Settings in the left panel:
- Change the Style to HH:MM:SS
- Leave the Default value as Current Time
- Expand the Advanced menu and click to turn off Form Visible.
- Select the Calculation field to open Field Settings in the left panel.
-
Expand the Calculation menu and follow these steps to configure the Calculation:
- Expand the first dropdown menu and select "Hidden Date."
- Click the multiplication (×) symbol to change the operator.
- Expand the second dropdown menu and select "Hidden Time."
- Click Save.
- Click Publish and Assign to users.
Be sure to test your Calculation in the mobile application or the Web Client.
How it looks
The result of this solution in the mobile application:
The result of this solution in the Web Client:
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 Workflow or Assignments. The office admin can:
- Generate a new submission, or Dispatch to themselves.
- Collect the number from the submission.
- Workflow or Reassign it to the person who will be completing the job. Or they could Unassign themselves so any users could Claim the submission.
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?
We'd really appreciate your feedback! Please leave your suggestions for improvement in the comments or let us know what you're looking for so we can assist you better. We want to help, but we need to understand your needs!
Comments
0 commentsPlease sign in to leave a comment.