Control - Autonumber
The AutoNumber control can automatically generate a custom formatted running number for each record.
Common running numbers such as HT0001, HT-2020-09-10 001, etc. can be implemented.
I. Four rule elements
1. Number
Numbering is an automatic incremental counting number with the following characteristics.
Numbering type
If it is a natural number, it is incremented from 1. If it is a number with a specified number of digits, it is complemented by 0 according to the number of digits.
Digits
For example, if the specified number of digits is 3, the records are numbered 001, 002...999.
Initial value
The start value represents the value to be used as the base for numbering. For example, if the start value is set to 1, the first record will be numbered as 1, and the subsequent records will be numbered as 2, 3, and 4 in order. If the start value is set to 5, the records are numbered 5, 6, 7, and 8 in order.
It should be noted that if the number is set to 1 at the beginning, and there are already 5 records, the maximum number is 5. If you change the start value to 30, save it and then add a new record, the new record will be numbered 35. If you want the new record to start at 30, you can reset the automatic numbering.
Cycle reset
Some running numbers may be recalculated in a certain cycle. For example, restaurant row numbers start at 1 every day.
The reset cycle includes "Reset every day", "Reset every week", "Reset every month" and "Reset every year". After setting the reset cycle, the count will start again from the initial value when the reset time is reached.
If the reset period is set to "Reset every day" and the initial value is 1, the records added tomorrow will be numbered from 1 again.
2. Creation time
For the record creation time, you can choose a variety of formats, and you can also customize the format.
Commonly used formatting rules for date/time are as follows:
Note: MM and mm are case-sensitive for months and minutes, respectively. Other rules are case-insensitive.
According to the above rules, then use the concatenation character (-/year, month, day, etc.) to output the established format.
Configuration
The date/time is 2020-10-15 15:25:18.
3. Fixed characters
Fixed characters are used for
Used as a ligature
For example, the symbol [-] is used to connect the creation date and number.
Used to identify different business
Similar operations may use the same rules for writing running numbers, but to better distinguish the running order numbers of different operations, you can add a prefix to them. For example, RK-001 for the incoming order number, CK-001 for the outgoing order number.
4. Reference fields
Reference to the fields in the form can help identify different businesses. You can refer to more than one field.
The fields that can be referenced are: text, options, time, region.
5. Sorting between rules
II. Configuration
For example, if you need a running number in the format RK-Wuhan warehouse-20201010001, the configuration is as follows:
Effect
After modifying the rule, the new rule will only work for newly created records. Even if the existing record has an empty number, it will not be filled automatically according to the new rule.
Ⅲ. Reset the auto-number
After the numbering is reset, the number of the new record will be counted from the initial value you set, and this operation cannot be restored. For example, the current number is MD098, after reset, the new record will start from MD001. (If you set the initial value to 5, the new record numbering will start from MD005)
Since the numbering can be reset, the numbering may not be unique.
IV. FAQs
1. How to change the automatic numbering of existing records
As mentioned above, after modifying the rules, the existing records will not be updated automatically according to the new rules. You can change the number of existing records by import an Excel file or through workflow.
Method A: To modify by importing an Excel file
First export the data in the table. You don't need to export all the fields, just the auto number field, the record ID field and one other field that can be used to distinguish the records, such as contact.
Open the exported Excel file, set the correct number for each row of records and save it. Do not change the other fields.
Import the Excel file, remember to check [Identify duplicate records], select the field "Field ID" based on the record, and overwrite the existing content.
Refresh the view to see the updated number.
Method B: To modify through workflow
Add a new text field named Correct Number.
Create a button to modify the auto numbering through the workflow.
After the workflow is triggered, you need to add an update record node that assigns the contents of the Correct Number field to the Auto Number field.
In the worksheet, first edit the numbers of all historical records in the "Correct Number" field.
Batch check the history records, click the button to update the automatic numbering.
Refresh the view to see that the auto numbering content has been modified
Remember to delete the custom button and the "correct number" field.
2. How to increase the number of new records in order, not starting from 1
For example, in the worksheet there are already 5 records, at this time if you add a new automatic numbering control, these 5 records are not numbered. You can follow the above to update the number of existing records, 1, 2, 3, 4, 5. If you add another row of records, you must want it to be numbered 6, but the actual number is 1.
This is because the default initial value for numbering is 1, and updating the numbering of existing records does not use this value, "1" is not occupied, so the new record still starts from 1.
You can reset the "initial value"
If you want the new number to start from 6, the initial value should be set to 6, so that the new records will be numbered 6, 7, 8 in order ....
Have questions about this article? Send us feedback