Skip to main content
Version: 8.1

Perspective - Barcode Scanner Input

Component Palette Icon:

Description

The Barcode Scanner Input component awaits for input from a barcode scanner. The component was designed for keyboard wedge scanners, as the component provides dedicated prefix and suffix properties to define scanner input. As such, it can be useful to think of the Barcode Scanner Input component as a specialized text field that does not require focus, and uses characters to decide when to accept and reject text input.

The scanner component is continuously listening, waiting for either the prefix and suffix characters to be entered, or the regex pattern to find a match. Once triggered, the component will load the scanned barcode string (excluding the prefix and suffix) into the data property for processing. The regex property can be used to extract specific fields from a scan, or validate data from the scan.

Properties

Most Properties have binding options. For more information on Bindings, see Types of Bindings in Perspective. This section only documents the Props Category of properties. The other Categories are described on the Perspective Component Properties page.

NameDescriptionProperty Type
prefixString value that mark the start of the barcode scan capture. If a value is provided to this property, then the regex property will be ignored.value: string
suffixString value that marks the end of the barcode scan capture. If a value is provided to this property, then the regex property will be ignored.value: string
regexRegex describing the format of scans. The first capture will be used as barcode. When used, this property will pull out the first group of any regex provided. Note that this setting uses Javascript regex, as opposed to other flavors of regex. If either a prefix or suffix value is specified with a non-empty string, then this property will be ignored.object
windowLength of buffer to monitor for regex match.value: numeric
captureMode
New in 8.1.16
Indicates which key event the component will listen for to start the barcode scan capture. Values include keypresskeyup, and keydown. Default value is keypress.
value: string
dataBarcode scans returned from scanner.array
dataStyleSets a style for data returned to this component. Full menu of style options is available for text, background, margin and padding, border, shape and miscellaneous. You can also specify a style class.object
styleSets a style for this component. Full menu of style options is available for text, background, margin and padding, border, shape and miscellaneous. You can also specify a style class

Styles can can be set on the component before a value is scanned.
object

Component Events

The Perspective Event Types Reference page describes all the possible component event types for Perspective components. Not all component events support each Perspective component. The Component Events and Actions page shows how to configure events and actions on a Perspective component. Component scripting is handled separately and can be accessed from the Component menubar or by right clicking on the component.