Creating Bar Code Reading Capability


By adding the document property AppMachineReadableCode to your analysis, you can activate the bar code reader capability of an iOS mobile device that uses the analysis.

The data table you import must have a column containing the data for either a bar code or a QR code. This column must have the data type String. When you import the data, check the Import Settings dialog to make sure the column containing the code has the right data type.

To add bar code reading capabilities for your mobile users:

  1. Open a file that contains a string column of bar codes or QR codes.

  2. Create a Table visualization.

  3. On the menu bar, select File > Document properties, and in the Document Properties dialog, click the Properties tab.

  4. Click New, and in the resulting dialog, provide the reserved name AppMachineReadableCode.

  5. Set the Data Type to String. Save the changes.

    Comment: You can leave the default value blank.

Your visualization now has the document property required to activate the bar code reading icon on an iOS device (available for a consumer user, either on TIBCO Cloud Spotfire or on premises).

Next, add a text area to display the code that the iOS mobile device scans.

To add a text area to display a scanned code:

  1. On the authoring bar, click    to open the Visualization types flyout.

  2. Drag the Text area to the wanted position on the analysis page.

    Response: A blank text area is created.

  3. Right-click the new text area, and then click Properties.

  4. In the dialog, provide a title, such as "Scanned Code," and then close the dialog to save the change.

  5. Click the Edit icon to edit the text area, and in the Edit Text Area dialog, insert a dynamic item for the document property AppMachineReadableCode.

  6. Provide a text label for the dynamic item.

  7. Resize the text area to contain just this item and the title.

You now have a text area where a scanned bar code or QR code will be shown when a code is scanned by an iOS mobile device using the analysis.  For example, the following image shows a text area for containing the ISBN code, which appears as a bar code on the backs of books. The text box will display a captured ISBN code when the code is scanned using a mobile device.

Next, create an expression to filter for a bar code.

See also:

Barcode Scanning

Creating an Expression to Limit the Data to the Bar-Coded Entry