Scanner Control

Official Content
This documentation is valid for:

Reads barcodes and QR codes directly into an attribute or variable in the Panel object's layout.


Generators: AndroidApple 
Controls: Attribute/Variable (Control Type: Scanner)



CodeRead event

When the control is displayed inline (that is, the Display mode property was set to Inline), each time it reads a code, it will trigger the CodeRead event.

Note that the ControlValueChanged event may also be triggered in some cases when the CodeRead event is triggered. The ControlValueChanged event behaves differently from the CoreRead event on that it:

  • is triggered regardless of the Display mode,
  • is not triggered if the same code is read twice.


In the following code, the &scanner variable is on screen, has the Control Type property set to Scanner, and the Display mode property set to Inline. It may also have the Operation mode property set to Continuous read.

The CodeRead event will be triggered each time a code is read. The example bellow adds the code read to a collection, and also displays a toast message showing the code.

Event &scanner.CodeRead
        msg( format('Scanner read code %1', &scanner), nowait)


Using the control

Just go to the relevant WorkWithDevices<Object>.Edit instance, select the attribute, and set Scanner for the Control Type property.

SD Scanner User Control contoltypeconfig.


  • The iOS simulator provided by XCode does not have any camera integrated to test Scanner control. If you want to access the camera you need a physical device.
  • It scans the most common of linear barcodes and matrix barcodes variants (e.g. QRCodes, EAN-13, etc).

See also

Scanner external object


Start Video Controls: Maps, Rating, Smart Grids, Switch
Start Video Conceptual model of mobile applications
Start Video Architecture of Online applications
Start Video Container of sections in the Detail screen of the Work With