Display from Form/List

From Form:

Formatter - Embed a barcode label directly on any form:

  1. Visit System UI -> UI Macros in the left nav.

    1. Locate & open the record titled 'barcode_formatter'.

    2. Copy the UI Macro code

    3. Create a new UI Macro, paste the UI Macro code from the step above, and update values in the code according to your needs (see screenshot below). Note: It is important to create a new UI Macro record. Insert & Stay will not work correctly.

    4. Copy the 'API name' of your UI Macro (for use in step 2b below).

    5. Submit your new record.

  2. Visit System UI -> Formatters in the left nav.

    1. Locate & open the record titled 'Barcode (Generator Form)'. Update the Name and Table fields to match the table where you wish to place the barcode label.

    2. Set the 'Formatter' field to the value you copied in step 1d above, adding '.xml' to the end of the value (see screenshot below).

    3. Insert and Stay to create a new record.

  3. Visit the form of the table where you wish to place the barcode label.

    1. Right click the form header and select Configure -> Form Layout.

    2. Find your new Formatter in the list and add it to your desired location on the form.

    3. Save the form.

Formatter on Form
UI Macro Example
UI Formatter Example

Dialog Box (Modal) from Form Button - Display a barcode label in a pop-up window:

  1. Visit Barcode & QR Code Generator -> UI Actions in the left nav. Locate and open the UI Action titled 'Test Barcode (Dialog)'.

  2. Update the Name and Table fields to match the table where you wish to place the button that will open the Dialog box. Following the instructions in the commented code, update code values to accommodate your needs. Insert and Stay to create a new record.

  3. Visit the form view for a record on the specified table. Click the button to open the barcode label in a Dialog box (modal).

Dialog Box from Form

UI Page from Form Button - Display a barcode label in a separate window:

  1. Visit Barcode & QR Code Generator -> UI Actions in the left nav. Locate and open the UI Action titled 'Test Barcode (Page)'.

  2. Update the Name and Table fields to match the table where you wish to place the button that will open the page. Following the instructions in the commented code, update code values to accommodate your needs. Insert and Stay to create a new record.

  3. Visit the form view for a record on the specified table. Click the button to open the barcode label on a new page.

Display from Form
UI Page

All options to display barcode labels on/from form utilize client-side barcode generation.

From List:

UI Page from List Choice - Display barcode labels in a separate window:

  1. Visit Barcode & QR Code Generator -> UI Actions in the left nav. Locate and open the UI Action titled 'Test Show/Print Multiple Barcodes (List)'.

  2. Update the Name and Table fields to match the table where you wish to place the list choice. Following the instructions in the commented code, update code values to accommodate your needs. Insert and Stay to create a new record.

  3. Visit the list view of the specified table, check as many options as desired from the list, and then click the specified UI Action from the drop-down menu. The barcodes will be displayed on a new page.

  4. If you wish to print multiple barcode labels from this view, it is recommended to click the Open in new Window link at the bottom of the rendered barcodes. This will open the view in a new window without the ServiceNow left nav, enabling a cleaner print.

Display from List
Multiple Barcode Display

All options to print barcode labels from list utilize client-side barcode generation.

Last updated