What is an automatic code?
If you need to allot an automatic code to every new item in a datasheet, this is the right thing to do.
What formats of the automatic code are supported?
- serial number
Is there a way to allot the automatic code to the already existing items?
Unfortunatelly, this is not possible yet.
Can I define more than one automatic codes for one dataheet?
Yes, you can. The user will select the right one while adding new item. One of your codes can be set as default.
How to set an automatic code for a datasheet?
Step 1. Click on the icon to go to datasheet settings (only accessible by administrators)
Step 2. Scroll all the way down to the section "Automatic code" and click on the "Add" button to define a new automatic code
Step 3. Choose a name of the code. This is what users will see and will be able to select from while creating a new item.
Step 4. Define the format
Type "&" at the beginning and ";" at the end. In the middle, you can put:
- for numbers: "i" for serial number, "i3" for serial number completed by the corresponding number of zero at the beginning (i.e. 001, 002, ..., 019, etc.)
- for year: yyyy
- for letters: "t" for title of the datasheet, "t3" for three first letters of the datasheet title, any fixed letters or symbols you wish to have in the code
- for any fixed symbols: symply type the symbol (letteres, numbers, etc.)
Combinations are possible, e.g. &i3;/&t3;
Code generated for the fifth new item in the "Contracts" datasheet will be "005 / CON".
|t||&t2;||title of the tree type||length of the abbreviation of the type title from the beginning|
|i||&i; &i4;||auto incremental number unique within the tree type||length, to which the number is added with leading zeros.|
|I||&I; &I4;||unique parent number||length, to which the number is added with leading zeros.
zeroes of the parent are ignored
|P||&P; &P2; &P-4;||parent prefix||without value the entire prefix is taken.
positive value indicates the length of the string from the left.
negative from the right
Step 5. Choose the first serial number
Step 6. Consider setting the automatic code as default for all new items
Step 7. Save