A label definition is a component of a label that MJ Platform uses to understand how the label should look when printed.
After picking a label type from the list of labels, you can create and edit custom label definitions (not default label definitions) for that label type.
Before you begin with the label editor, copy the ID of a package/plant in your inventory that the custom label definition would apply to. You will be able to paste the ID into the label definition editor to see the relevant data keys and to preview how the printout would look on the package.
Note: When you select a label type to edit, you need to select one that applies to the entity you want to create a label for. There are inventory package labels, plant labels, and patient package labels.
Label Definition Editor
Getting started
Go to the label definition editor
[get goto_label_editor]
Scroll to the top of the page and click the Change Elements On Your Label tab to access the label definition editor for this label type.
Create a custom label definition
Click Add in the top-left pane to add a new customizable template. A window appears.
In the window, specify the initial settings for the new label definition:
Enter a name for the label definition.
Under Based On, select an existing label definition to copy. If there are no custom label definitions yet for this label type, the default label definition will be copied. (All the copied settings can be changed for the new label definition.)
Click Save. The new label definition is created and selected for editing.
Select a custom label definition for editing
In the Labels Defined From This Base Label pane, click the label definition you want to edit. The label definition name becomes bold and the rest of the page displays the label definition's properties.
Note: You cannot modify a default label definition. Select a custom label definition to edit its properties.
Editing a label definition
Change the label definition's main properties
The Properties pane allow you to set margins and define other attributes for the currently selected custom label definition.
Note: You cannot modify a default label definition. Select a custom label definition to edit its properties.
Click Edit on the pane to modify the properties.
Label Definition Properties
Setting | Description |
Definition Name | The name of the label definition. |
Width | The width of the printout, in inches. |
Height | The height of the printout, in inches. |
All Text Upper Case | Whether to enforce upper case lettering for all text on the printouts. |
Font Size | The default font size of text on the printouts. |
Label Rotation | Whether to rotate the printout 90 degrees clockwise. |
Print Across Multiple Labels | If set to "Yes", multiple labels will be printed if the content does not fit on a single label, similar to multiple pages of a document. |
Top Margin
Bottom Margin
Left Margin
Right Margin | The margins of the label, in inches. If opposite margins overlap, or if a margin is greater than the label size, you will encounter printing errors. |
Status | If set to "Disabled", this label definition will not be available for selection for printing in MJ Platform. |
Delete Label | Click twice to permanently delete the label definition.
A deleted label definition cannot be recovered. |
Add a data key to the selected label definition
You can check the list of functioning data keys to see which one to add.
If you want to preview what a data key would look like for a package, go to the Inventory page and copy the ID of the package, then go back to the Label Definition Editor page, paste it into the sample field, and click View Data Keys.
A window appears listing all the data keys along with their resulting text for the particular package.
Note: We recommend checking out the Data Keys Reference article linked above to avoid using a data key that may not be correct for your use case yet seems correct in the preview.
Keep in mind that the value of any data key can be rendered as a barcode on the printout.
Adding the data key to the label definition
Note: You cannot modify a data key or field label once it has been added. Instead, delete the row and add a new row with the modified data key.
Click Add Row on the Label Editor pane to open the Add A Row window.
Fill out the fields on the window:
Field Label: Enter a brief descriptive label for the data key. The text appears as-is on the printouts followed by a colon, unless you enter one of the special codes listed below. In that case, it will appear as follows:
product_name: "Product:"
batch_id: "Batch:"
lot_id: "Lot ID:"
package_id: "PkgID:"
tracking_id: "Tracking Id:"
weight_hidden: (blank)
Data Key: Paste the data key into this field.
You can also enter two data keys into the field. If you separate them with a space, then they will both be displayed one after the other. If you separate them with two vertical bars || then the second key will be displayed as a backup if the first key is blank for the package.
If you want to use the row as a heading with no data key text, leave the Field Label blank, enter three dashes --- into this field, then Save. Format the row (see below) and enter the heading text into the Replace Value field.
Click Save. A new row is added to the bottom of the table with the field label and data key set as specified.
Manage data keys for the selected label definition
The Label Editor pane allow you to add/remove data keys from the currently selected custom label definition and set the formatting for each data key.
Note: You cannot modify a default label definition. You can edit a custom label definition or create a new one.
The table in the editor shows you the data that will appear on printouts of the label definition in order from top to bottom. The controls in each column allow you to change the label definition.
Column | Description |
Move | Click one of the arrows to move the row up or down. This changes the order in which the information will print on the labels. |
Field Label | A description of the data. It appears to the left of the text generated from the data key.
You cannot modify a field label once it has been added. Instead, delete the row and add a new row with the modified field label text. |
Data Key | A code that results in different text depending on the package for which the label is being printed. For example, the data key
item_name will result in the name of the product.
You cannot modify a data key once it has been added. Instead, delete the row and add a new row with the modified data key. |
Format | A list of non-default formatting applied to the row. The text on the left indicates the formatting setting, and the text on the right indicates its value.
See Change how the data will look on printouts below for format information. |
(Delete) | Click the Delete button to delete the row. |
Change how the data will look on printouts (Row formatting)
Click the text in the Format column to open the formatting window.
From this window, you can set up how the information on the row will appear on printouts.
Note: The formatting is also affected by the settings in the Properties pane (see above).
The settings are grouped into panes based on functionality.
Presentation Settings
Setting | Description | Options |
Align | The horizontal alignment of the text based on the margins. | Default: Aligns text to the left margin.
Left: Aligns text to the left margin.
Center: Aligns text to the middle of the left and right margins. (If the left and right margins are not equal, this will not be the center of the physical label.) This option does not work with QR codes. Use the Left Offset setting instead.
Right: Aligns text to the right margin. |
Bold | Whether the text will be bolded. | Off, On |
Font Size | The size of the text. | (Blank): Uses the font size specified in the general properties of the label definition.
(Number): Sets text to the indicated font size. A negative number renders inverted text. |
Letter Casing | Enforces a specific letter casing.
Note: If the property "All Upper Case" is set to "Yes", it overrides this. | Default: No specific letter casing enforced.
Proper Case: Sets the first letter of each word to uppercase (does not set the rest to lowercase).
Upper Case: Sets all letters to upper case.
Lower Case: Sets all letters to lower case. |
Date | If the text from the data key is a date, sets whether to include the time. | Default (Date Time), Date Only, Date Time |
Yes or No | Whether to convert 1 to Yes and 0 to No. | Default: No converting.
Enabled: If the text from the data key results in "1", then "Yes" is printed instead. If the text from the data key results in "0", then "No" is printed instead.
Disabled: No converting. |
Behavior Settings
Setting | Description | Options |
Display | Sets conditional rendering of the row based on the data key's result for the package.
When a row is not rendered, the printer immediately moves on to the data in the next row (it does not leave a blank line on the printout). | Default: Always renders the field label even if the data key does not contain a value for the package. A hyphen will be printed to represent the empty data key result.
Never: Never renders the row.
If Present: Renders the row only if the data key has a value for the package. |
Hide Label | Whether to hide the field label. | Off: Shows the field label.
On: Skips printing the field label and immediately moves on to the data key (it does not leave blank space in place of the field label). |
Replace Label | Sets replacement text for the field label on the printout.
You can use this, for example, to replace the field label with short form text if your original field label text is too long. | (Blank): Uses the field label text.
(Non-blank): Uses the text entered in this field (which will still be followed by a colon). |
Replace Value | Sets static replacement text for the data key.
You can use this, for example, in conjunction with the Hide Label setting to display a static symbol or brief static message. | (Blank): Uses the data key result.
(Non-blank): Uses the text entered in this field. |
Position Settings
Setting | Description | Options |
Left Offset | Increases the left margin of the text by the specified number of inches and prevents a line break. | (Blank or 0): Uses the default left margin.
(Number): Uses the default left margin plus the number of inches specified. This also removes the default line break at the end of the row, so the next row will appear on the same line. A negative number decreases the row's left margin. |
Relative Top | Sets the top position of the row, in inches, measured below the vertical position it would normally appear at. | (Blank or 0): Sets the top position to the default vertical positioning based on the number of rows with line breaks (i.e., rows with default left offsets) before this one.
(Number): Sets the top position to the default vertical positioning based on the number of rows with line breaks (i.e., rows with default left offsets) before this one, plus the number of inches specified. A negative number moves the position up. |
Absolute Top | Sets the top position of the row, in inches, measured below the top margin. | (Blank or 0): Sets the top position to the default vertical positioning based on the number of rows with line breaks (i.e., rows with default left offsets) before this one.
(Number): Sets the top position to the top margin plus the number of inches specified. A negative number moves the position up. |
Barcode Settings
Setting | Description | Options |
Bar Code | Sets the barcode rendering of the data key. If set to anything other than Default, the field label will not be rendered on printouts. | Default: Renders data as regular text.
Bar Code: Renders data as a linear ZPL barcode, which is compatible with most ZPL-enabled printers, has a fixed width, and cannot be scaled.
QR Code: Renders data as a rectangular QR Code, which only 2D scanners can read.
S C128: Renders data as a linear Code 128 barcode, which is similar to a ZPL barcode but has a variable width depending on the data. It can also be scaled. |
Width | Only available if the QR Code option is selected for Bar Code.
Sets the size of the QR code, in inches, on the printout.
If the size is too large, it will not appear on the printout. Check the label size and the margin settings. | (Blank): Sets both the width and height to 0.25 inches.
(Positive number): Sets both the width and height to the number of inches specified. |
Bar Code Height | Only available if the S C128 option is selected for Bar Code.
Sets the height of the barcode, in inches, on the printout.
If the height is too large, it will not appear on the printout. Check the label size and the margin settings. | (Blank): Sets the height to 0.25 inches.
(Positive number): Sets the height to the number of inches specified. Use a small decimal number. |
C 128 Horizontal Scale | Only available if the S C128 option is selected for Bar Code.
Sets the horizontal stretch of the barcode. If the resulting width is larger than the label width, it will be cut off. The base width depends on the length of data resulting from the data key. | Default: No horizontal stretching.
(Number): Stretches the barcode by multiplying its base width by the selected number. |
Anchor Bottom | Only applicable if the Bar Code or QR Code option is selected for Bar Code.
Sets whether to anchor the barcode to the bottom margin. | Off: No anchoring.
On: Fixes the bottom position of the barcode to the bottom margin of the label. This overrides the Relative Top and Absolute Top settings. |
No Code Protection | Whether to prevent text on the same line from printing over the barcode. | Off: Prevents text on the same line from printing over the barcode. The text is cut off.
On: Allows text on the same line to be printed over the barcode. |