Skip to main content
Matrix42 Self-Service Help Center

Barcode Label

This Marketplace App has been designed to allow the user to:

  • generate and assign consecutive and unique Number Codes, e.g. for usage in serial numbers of assets
  • design label layouts for CIs that may contain images and data represented as text or barcode
  • generate labels following that specified design and store them as attachment to the corresponding object
  • print such labels using a self-defined printer configuration
  • embed the highly configurable custom ASP-Control "ScanLoop" into own controls or pages
  • use a barcode scanner to automatically execute one or more of the following actions to 
    • each scanned object:
    • (Re-)Create the label and print it
    • Set a previously configured set of attributes
    • Run a custom Workflow with configurable parameters

Installation

This package is a configuration package and can be installed over the UUX UI Administration > Extensions > Installed Packages.

clipboard_edb04dec980cd3e77548ed1aa6316d081.png

A certificate for "M42CDEVBarcodeLabel" must be purchased and copied into the /<root>/Certificates folder in order to use the functionality. The installation will work without 
a certificate.

Configuration

After the package has been installed you may want to configure the logging configuration to dump all log messages for this App to a separate file. In that case you need to open the file /<root>/bin/Matrix42.log.config and add the following lines:

clipboard_eb0c884272b6b227bbc08a255506cdc6a.png

Navigation

A new  navigation item Barcode Labels  will appear in the administration application offering quick start elements and sub navigation items for overviews of the created objects.

clipboard_e6215c7eb48d2219d78888aa6b4451ffe.png

Configuration Items

Label Layout

Dialog Page : General

clipboard_e28e46bfaa335814b5015b44c22a44aec.png

Field Name Description
Name Set an arbitrary name for this layout here, so you can recognize it later
Target CI The internal name of the CI for which this layout should be used. Only one CI may be entered per layout. Do not refer to the same CI in more than one layout!
Background Image The name of the image that will be used for the background of the label. An image with this exact name must be uploaded as attachment to this object. 
The size of this image ( in pixels) will define the size of the resulting label if not both width and height are set below! If both are given, the background image will be stretched to fit.
Leave empty to use a blank (white) background.
Width  Width of the resulting label image, if both width and height are set.
Height Height of the resulting label image, if both width and height are set.
Visual List These visuals will be rendered on top of the background. Double-clicking 
a row will open its edit dialog

Multifragment Dialog: Visual

When adding or editing a single Visual via double-click, the following dialog will open up:

clipboard_e577e0e2b4bdddc815eb713d1aac5a2be.png

Field Name Description
Name Set an arbitrary name for this layout here, so you can recognize it later.
Kind Specify what type of visual this will be. See the meaning of the different values explained in the 'Content' explanation below.
Content For kind 'Text' simply enter a string that will rendered as text as it is provided.
For kind 'ASQL' enter an ASQL-expression that will be evaluated for each target object. This may be a path to the desired value (starting from the SPSCommonClassBase) or any valid concatenation of values, functions and constants. For details about what ASQL can do, please see the ASQL-documentation.
For kind 'image', set the name of the file that needs to be uploaded as attachment to this layout object. Same as for the background image.
For kinds containing the additional word 'Barcode' the corresponding rules as mentioned above apply, but the resulting value will be rendered as Barcode-Image and not as text.
Position X Left side of the rendered visual will start in this distance (in pixels) to the left side of the background.
Position Y Top side of the rendered visual will start in this distance (in pixels) to the top side of the background. 
Width Width of the rendered visual in pixels.
Height Height of the rendered visual in pixels.
Z-Index In case of visuals taking the same spot, this index defines which will be above or below other visuals. Higher indexes will be on top, lower ones in the background.
Text Design Use these fields to set some of the typical styles of rendered text visuals. To see which font and color names are available please refer to the MSDN library

Dialog Page: Preview

The Preview page shows what this label would look like for a given sample ObjectID:

clipboard_ecab980e19fa2ca321f7e87acddb3ca09.png

You may need to save changes made before to see the current outcome.

Printing Preferences

In this CI you may save configurations of a selected printer with a special set of settings that will be used each time when printing with these preferences.

clipboard_eeea5f1b9d5e6b72ad513e8296358bc60.png

Most attributes should be pretty self-explanatory. Give this configuration a speaking name, select one of the printers installed on the M42 Application Server and choose whether to use color or black/white and landscape or portrait format.
You may add users to the list below. Whenever the 'Barcode Scanner' wizard is opened the preferred printing configuration of the currently logged in user will be automatically preselected (if not overridden by a specially configured default).

 

Barcode Scanner Wizard

This wizard offers different functionalities in combination with a barcodescanner or manually typed values. The input field for a barcodescanner is configurable for different keycodes (https://developer.mozilla.org/de/docs/Web/API/KeyboardEvent/keyCode).for the suffix in order to delegate an event to the wizard to use one or many functionalities after the scan.
The 'ASQL Matching Expression' is the field to set the filter which object should be searched in the database. This filter expression is always addicted from the SPSCommonClassBase . e.g. You want to  get a computer object by its inventory number then the expression T(SPSAssetClassBase).InventoryNumber  would be it.

The following radio buttons where it can be selected if the scans should be added to a list for a later execution of all scanned items or directly executed on the configured functions.

clipboard_e7a5f7108ade35ae7408e358849e9216b.png

There are three functionalities which can be executed on a scanned object.

  1. Print Label : This will print a Label of the scanned object(s) on the selected printer and set an attachment of the barcode label for this object.
  2. Set value :This will set different values which are configured in the layout configuration in a context parameter  "custom_valueConfig"

    clipboard_e43672f58043ea6e802a54f6a64002e07.png

    By double clicking on each row the values can be set. Depending which type of value is expected and configured the selection  will be different. e.g. dropdown for pickups, objectlink for relations or textbox for strings
    clipboard_e86422ca6214b781c64b5ab1c98505188.pngclipboard_ed8d7c867db57bbbfa74dfee9af4b6d8a.png
    clipboard_ede1f3efa3f21bbfb6285eef48bd49943.png
    clipboard_e64af5903d060babd7a08a5e8f9d4823b.png
  3. Start Workflow : This functionality will start a selected workflow with a parameterized configuration which can be configured in the layout  in a context parameter  "custom_workflowConfig"
    The values of the configuration can be be set analog the value set configuration.

The button "CLEAR LIST" clears the list of the scanned objects. The other button "EXECUTE" executes the scanned objects list with the selected and configured functionalities described before.

Barcode Scanner Wizard configuration

The barcode scanner wizard can be customized for more and less functionalities. Matrix42 recommends to copy this wizard, combine with an action and customize the copied wizard for the functionalities which are expected.

Following context parameters are for the configuration of the wizard important:

custom_valueConfig  and the custom_workflowConfig is an object array where the configuration lists of the "Set Value" and "Start worklfow" functionality can be adapted. For each kind of value there is an example in the context parameters e.g. pickup, text,relation, checkbox.

clipboard_e1836807817a8fef5a13f9ecab52d9ede.png

clipboard_e4ec436101433e4248109360f8949a5ae.png

The barcodeScanExecuteModel input paramter for the custom_ScanBarcode webservice can be adapted if some of the functionalities ar not needed or has to be extended. If this input parameter has changes thorough the watchers which are added the the webservice will be executed.

clipboard_e7fd4be6ad6decce7d9cebc31a0e8ef58.png

The customScannedObjectList is responsible how the list is filled for the webservice  which executes the functionalities for this list.

clipboard_e6e0229816bae957f1e497cfe7dec89d9.png

The customScannedObjects parameter is responsible for the list of success messages of the scans and executions.

clipboard_e480f9cd4f4fbaac0295dc3b9afe5b770.png

The custom_selectedPanel parameter is responsible for the radio buttons, if You want to set it invisible and just use one of the events then you have "addtolist" or "execute" to set as default.

clipboard_e7d5272a187caf48dcce39393f320a764.png

If You want to use the wizard in an action with context like select an object in an overview then it is recommended to remove the scan input control and set the "ScannedString" parameter of the barcopdeScanExecuteModel from the webservice with the ObjectId of the context parameter and set the ASQL matching expression on T(SPSCommonClassBase).[Expression-ObjectID].

 

Workflow execustion example

The picture below shows the corresponding definition example of a custom Workflow in the Matrix42 Workflow Studio:

clipboard_e083fdd4cdf3c34d3c0a361c2f498d2a9.png

It is important that Name, Direction=In and ArgumentType match the definition of the custom control property PresetWorkflowParameters.

And this is what a started Workflow with custom parameters looks like in the tracking mode of the Matrix42 Workflow Studio:

clipboard_e2dccf1e781711924a5becca398bcd04e.png

Pay special attention to the parameter 'ObjectContexts', which has not been configured but is a result of the set of scanned objects - just like any other Workflow of integration context.

 

  • Was this article helpful?