Adding a Barcode Widget

About this task

Use the Barcode widget to request the device's camera to scan and read information delivered through a barcode.

Procedure

  1. In the Canvas, open the Widgets tab.
  2. Double-click or drag and drop the Barcode widget onto the app canvas.
    The Barcode Properties panel displays its sections on the right.
  3. In the General section, set the following fields:
    1. Enter an ID and Barcode Name for the widget or keep the defaults.
    2. Optional: Enable the Field Label toggle if you like to enter a custom label for this widget using the Text field box.
    3. Optional: Use the Display text field to give hint text indicating the type of content to enter in the text box. The display text disappears when the user makes a selection.
  4. In the Scan Setting section, set the following fields:
    1. Turn on Save Scanned Value to save barcode values in the Barcode column in reports.
    2. Turn on Overwrite to overwrite previous values with the latest scanned value.
    3. Turn on Allow Continuous Scanning to enable the app user to scan more than one barcode consecutively. If you turn this option off, the app user must relaunch the barcode widget to scan each barcode.
    4. Select the barcode formats you want to enable. The app ignores unselected barcode formats.
      This option can improve speed and performance by limiting the number of barcode formats to only those that your device app users may encounter.
    5. For Scan Device, choose which photo-capturing hardware to use when taking a picture of the barcode.
      • Device Camera: Use the device's default built-in camera.
      • Specialized Device: Use a specialized scanner provided by the device's vendor. From the Select Vendor drop-down menu, choose the device's vendor. If there is an issue with the vendor's specialized scanner, you can Use Device's Camera In Case Of Any Issues With Device Scanner instead.
        Remember: When you select Specialized Device, your device users must download a different SOTI Snap Device Agent specific to the vendor you have chosen.
  5. In the Text Formatting section, change the default formatting settings for text.
  6. In the Widget Alignment section, choose how you want to align your widget in the app.
    • Align Left
    • Center
    • Align Right
  7. Optional: In the Rules section, add a requirement rule to the widget.
    Use requirement rules to specify whether the app user must configure this widget or can skip it.
    1. Select Requirement Rule to open the Set Requirement Rule dialog box.
    2. Select whether the requirement rule requires meeting all or any conditions.
    3. From the Field list, select an app field or variable and an operator. Enter the value required for the widget to be visible.
    4. Select Add Condition to add another condition.
    5. Select OK to save.
  8. Optional: In the Rules section, add a visibility rule to the widget.
    Use visibility rules to control when a widget is visible to the app user. For example, you can create a condition that a widget should only appear after the app user fills in a field or submits a form.
    1. Select Visibility Rule to open the Set Visibility Rule dialog box.
    2. Select whether the visibility rule requires meeting all or any conditions.
    3. Select an app field or variable and an operator from the Field list. Enter the value required for the widget to be visible.
    4. Select Add Condition to add another condition.
    5. Select Save.
  9. Optional: In the Miscellaneous section, decide which name you want to appear in the widget report.
    The Same as widget name setting is the default selection and automatically uses the widget name as the chart title. To choose your own chart title, clear the option and enter a new name.

    You may use special characters except for % & < > { } * | ^ and double spaces.

  10. Move to the Format tab to customize the widget's appearance.
  11. Optional: Add an OnScan event and applicable actions to the widget. Events are activities that you can set to trigger an Action. When the app user scans a barcode or QR code, SOTI Snap triggers the OnScan event.
    Important: Due to the complex combinations available to use, the following steps are guidelines only. You'll need to replace the listed events and actions with your own to suit your app's needs.

    Learn more about the available events and actions at Events and Actions.

    1. Switch to the Events tab.
      Events tab in Widget configuration panel
    2. Choose the OnScan event from the Events dropdown list and then select Add beside Actions.
    3. Select the Map Scanned Value action and configure it.
      Note: You must configure the Map Scanned Value action before you configure any other actions.
    4. Select Add to apply it to the widget.
    5. Select Save to save the action.
    6. Repeat for any other event and action combinations and return to the Properties tab.
  12. Select Save in the SOTI Snap banner to apply your changes.
    Save app button

Results

Tip: Select Preview to see how the widget appears in your app.