# Implementing Barcodes with Custom Data (Package Rules)

Another method to implement a barcode involves the authoring of custom data within the Package Rules tab in the Requirements Editor. When custom data is added to an REQ file, the data is automatically inserted in the position specified in the pattern. This method adds information to a barcode that is in addition to, not replacing, any barcode values submitted in the request containing an Barcode object as part of the AncillaryOutputOption.

In this method, you define a package rule that will contain custom data. The custom data, as a name/value pair, should use a naming convention of BRCD with the value being a string. The system then converts the custom data into a recognizable pattern (%BRCD...%) and renders the data into the generated barcode in the position specified in the pattern. The package rule comprises one or more custom data pairs (BRCD1 TestDoc1 and BRCD2 TestDoc1) and might look like:
In this example, the custom data described above is associated with a request containing a Barcode object submitted with a Code128 barcode type and a pattern that included the %date% parameter. The generated barcode contains the custom data in first position followed by the date as requested as `BRCD1 TestDoc1BRCD2 TestDoc108/18/2014`. Where the two BRCD values represent custom data and 08/18/2014 represents the values from the %date% parameter.
Note: Multiple BRCD values can be placed in the requirements document and included into the pattern. Any value not specified in the pattern is ignored and does not appear in the generated barcode.