Auto-code policies make it easy to automatically generate an identifier (e.g., name, ID) for a large number of records such as barrels or tanks using a pre-defined convention. Using auto-codes is not only faster, but also ensures consistency.
Auto-code policies can be set up for the following record types:
Configuring an Auto-Code Policy
You can configure an auto-code policy from the Winery Setup window (Setup Options > Workflow > Auto-Code):
- Click Set Up in the sidebar.
- Click General.
- From the Auto-Codes tile, click Configure.
- Click New Auto Code Policy. The Auto-Code Policy window displays.
- Specify the details for the policy including:
- Auto-Code Policy Name — A name for the policy.
- Auto-Code Policy Type — The type of record that the policy applies to.
- Add the policy’s code elements.
- Click Save.
You can set the default auto-code policy for the record type.
Each auto-code policy is made up of one or more code elements. Code elements are the individual parts of the identifier generated by the auto-code policy. When these code elements are combined, they result in a unique name for the record.
For example, you could create an auto-code policy for trial blends that creates a code using the year, the text TB-, followed by a three-digit number (e.g., 2020TB-001, 2020TB-002, 2020TB-003).
There are three types of code elements available for auto-code policies:
- Attribute — An attribute is a characteristic of the record that you’re adding. Available attributes will depend on the selected auto-code policy type. For example, if you’re adding an auto-code policy for batches, the attributes include the vintage, owner, grower, and vineyard. If you’re adding an auto-code policy for barrels, the attributes include the purchase year, capacity, purchase year, and cooper.
Auto-code policies for batches, bins, and gyro cages also include a CustomCode attribute.
- Inc — The Inc code element includes an increasing number in your auto-code policy. Each auto-code policy must include the Inc type to ensure that each generated name is unique. When you select the Inc code element type, you’ll need to enter 0s (zeroes) in the Value field to specify the number of digits for the generated number. For example, to generate two-digit numbers (e.g., 01, 02, 03), enter 00 in the Value field. To generate three-digit numbers (e.g., 001, 002, 003), enter 000 in the Value field.
- Text — The Text code element type includes static text in the generated code. Including text can help with the readability of the code and make it easier for you to distinguish record types from one another. For example, you could include the text BRL for barrels, BIN for bins, and GYR for gyro cages.
Custom codes only apply to batches, bins, and gyro cages.
The CustomCode attribute provides another way to further customize the identifiers for your batches, bins, and gyro cages. For example, suppose you have an auto-code for batches with the following code elements:
- 3-digit increment number
Now suppose you also want to include an identifier for the winery in the custom code. For example, you want batches for JX2 Estate to include JE in their name so that you can easily identify them.
To use a custom code in your auto-code policy:
- Set up a custom code from the Winery Setup window (Setup Options > Workflow > Custom Codes). The text entered in the Code field is what will be included in the identifier. Be sure to select the record type(s) that the custom code can be used for. If the custom code can be used for batches, select the Batch checkbox. If the custom code can be used for bins or gyro cages, select the Vessel checkbox.
- Set up an auto-code policy that includes a custom code in its code elements.
- Create the new record being sure to select the correct auto-code policy and custom code. In this example, we create a wine batch that uses the policy and custom code that we set up in the previous steps.
This example creates a wine batch named 20JECSNV001.
Selecting a Default Auto-Code Policy
After you’ve added an auto-code policy, you can configure vintrace to use the policy by default when you create a record. For example, if you have multiple auto-code policies for bins, you can select one of those policies to be the default when new bins are added.
Users will still have the option to override the default and select a different policy.
You can specify the default auto-code policies from the Winery Setup window (Setup Options > Workflow > Defaults):
- Click Set Up in the sidebar.
- Click General.
- From the Defaults tile, click Configure. The System tab displays by default.
- From the Auto-Code Policies section, select the default policy that you want to use for the different record types.
- Click Apply.
Using an Auto-Code Policy
When an auto-code policy is selected, that policy will be used for all records that you’re setting up at that time. For example, if you’re setting up multiple barrels, the auto-code policy for all the barrels created.
If a default auto-code policy has not been selected for a record type, a wand icon displays beside the field. To select an auto-code policy:
- Click the wand icon.
- Select the auto-code policy that you want to use.
Overriding the Default Auto-Code Policy
If a default auto-code policy has been selected for a record type, [Auto Code] displays in the field.
To override the default auto-code policy:
- Click the X icon displays beside the field to de-select the auto-code policy.
- To select an auto-code policy, click the wand icon, then select the auto-code policy that you want to use.
Article is closed for comments.