Barcode Parts
Last updated
Last updated
Barcode Parts are the individual components that comprise a barcode label - they are child records of your Barcode Generator. Depending on your use-case, a barcode label may be a single barcode element, or it may be a combination of barcodes, HTML, text, and images.
When building a barcode label to use within our PDF Generator integration, we recommend creating a Barcode Generator with a single Barcode Part that is the barcode or QR code component, and then using PDF Generator to add any additional content.
In most cases, you will create new Barcode Part records from the Related List on the Barcode Generator form. This ensures they are properly linked to the parent Barcode Generator.
Depending on the type of Barcode Part you create, you will find different options on the form.
Format: Select the barcode type you wish to generate. Most popular barcode formats are included, but Yansa Labs can add any additional format you require. If you don't see the format you need, contact us at Yansa Labs Support.
Include check digit: Generate a check digit for a barcode, where applicable
Height: Height of the generated barcode
Alignment: Where to position the barcode within its container
Color: Hex RGB notation color for the barcode (#000000)
Value: The value to encode. Many barcode formats are constrained in what data they can encode. The app will highlight under the Format field what type of data is valid for the format you select. See hint below for information on dynamic/programmatic content.
Show value: Whether or not to show the unencoded value beneath the barcode. Note: You can improve performance of barcode generation by leaving this unchecked and instead displaying the barcode value using an HTML or Text/Spacer type of Barcode Part instead.
Hide if error: Whether or not to hide the barcode element if an error occurs during barcode generation. If unselected, an error message will be shown. It can be useful to disable this during testing to help identify any barcode format/type data mismatches.
Alignment: Where to position the barcode within its container
HTML: HTML content to display. See hint below for information on dynamic/programmatic content.
Size: Size in pt to make the text or spacer
Alignment: Where to position the barcode within its container
Value: Text value to display (leave blank for spacer). See hint below for information on dynamic/programmatic content.
For all types of Barcode Parts, the Value or HTML field can include static, dynamic, and programmatic content.
Static: Simple text, images, etc
Dynamic: Data pulled from the record that the Barcode Generator references. Use {handlebar} brackets to insert data by field name into your Value. For example, on the Asset table:
To display the asset tag number, use {asset_tag}
To display the Assigned to person's location, use {assigned_to.location}
Programmatic: Run-time generated value from server-side Javascript. Use a value in {handlebar} brackets starting with 'javascript:' to insert these into your value. For example:
To display the current date/time, use {javascript:new GlideDateTime().getDisplayValue();}
Use the Order field on each Barcode Part to determine the order in which the parts are displayed on your barcode label. They will be displayed in ascending order, either top-to-bottom or left-to-right, depending on whether your Barcode Generator orientation is 'Vertical' or 'Horizontal'.