In vintrace there are a variety of things that can be automatically named and coded in the system via the use of Auto-codes. It is also very handy when you need to create multiples (barrels, tanks, etc) quickly and want them all to share a given naming convention.
Auto-codes are powerful tools that allow you to automatically assign a name based on the properties of the object being named (wine batches, barrels, kegs, tanks, bins (fruit and tirage)).
Constructing an Auto-code
Head into Winery setup > Workflow folder > Auto-Code.
To create a new Auto-code click New Auto-code Policy, Auto-Code Policy [CREATE] will open.
Auto-codes are quite often used to name multiple barrels using consistent naming rules.
Enter a Name for your Auto-code - Barrels
Set the Auto-code Policy type - Barrel
Now you can begin to use the various elements to create barrels that have a consistent naming convention.
There are three base types of code elements you can add into a Auto-code:
Attribute use the properties of a barrel (eg, the barrel's cooper, year, forest, etc).
Generally attributes that are tied to other parts of the system, for example Coopers in the Address book, need an auto-code or code option (2-3 numbers or letters) that will be inserted into the Auto-code.
This is static text that always appears; for example JX- where the dash is always used as a separator.
INC adds a incrementing number that increases by 1 each time and is capable of zero-padding.
For example, if you enter a 0 in the field, vintrace will not zero-pad (1, 2, 3, etc).
NOTE: you must use an incrementer of some sort; if this is left off the auto-code, vintrace will create one item; when it attempts to create the second one, that name will be identical and vintrace will let you know that the name is already in use.
If you enter 00 vintrace will zero-pad to one place (01, 02, 03); if you enter 000 vintrace will pad to two places (001, 002, 003). Zero-padding is useful if you want to keep all of your codes the same length.
vintrace also allows you to design and use custom code snippets for use in Auto-codes when creating a wine batch (lot), bin, or gyro cage. For information on custom codes, click here.
Putting it all together
In the example below, all three elements are used:
JX- is Text; all barrels created with this auto-code will start with JX-
Next, Attribute YearYY uses the last 2 digits from the barrel and Cooper uses the two-letter auto-code.
Lastly, Incrementer that has a 3-place zero-pad (001)
After you make your selections, click Add and vintrace will insert it into Code Elements. Use the Up and Down arrows to re-arrange the order.
If you would like the number to be unique for each automatically generated code select the Keep the number unique box.
When you are happy with the auto-code, click Save.
Use an Auto-code
When you are ready to use this Auto-code to create multiple barrels at once, head into Winery setup > Vessels > Barrels.
Click New Barrels
If you have at least one Auto-code for barrels, leave the Name field as is.
If you have more then one barrel Auto-code, X out (re-set) [Auto code]; when the magic wand appears, click and select the desired Auto-code from the list.
The Name field will once again display [Auto-code]. Don't worry; your chosen Auto-code will be used.
Fill in rest of the mandatory fields and any others that are to be used with the Auto-code.
When you have completed the barrel setup, head down to the area where you specify how many barrels you want to create with the same properties.
It is important to remember that every barrel you create with this run of the Auto-code will share all of the same characteristics. If you need to change Cooper, Capacity, Year, etc, you'll want to create a new barrel (still using the Auto-code), fill in the specifics for that set of barrels and create the correct number of identical barrels (only the incrementer number will change). If you checked Keep number unique, vintrace will track the last number used and your new run will pick up with the next number.
Leave the incrementing items at 1 if you want to add a single barrel.
When satisfied, click Save; vintrace will create as many new items as you specified, all with the correct naming convention applied:
You may have different auto-codes for the same Auto-code type; eg, Auto-code for your 59G barrels, oak kegs that you use as break down vessels and stainless steel drums/kegs, both of which you set up as barrels and want them named differently (KG for wood kegs, SS for Stainless, for example).
It is important to remember that any auto-code that derives attributes from the barrel, batch, etc, the related field must be filled in the creation process. If you are going to use the Attribute YearYY for a barrel, the Year field must be filled in; if Vintage is used in the Auto-code for wine batches, you must include the set the Production year correctly when you create the new wine batch.
Auto-codes may be used to ensure consistent naming across a variety of items in vintrace.