Adding Location or Machine Readable Capabilities to a Mobile-Ready Analysis

Creating an expression to limit the data to the bar-coded entry

After you add scanning capabilities for a mobile app user, add an expression to limit the data to show only the row that matches the scanned item.

About this task

Perform this task in Spotfire Analyst using a data set that has a string column containing bar codes or QR codes.

Before you begin

You must have completed the following tasks.

Procedure

  1. From the menu, click Insert > Calculated Column.
  2. Add the following expression.
    If('${AppMachineReadableCode}' = '' or [barcode] = '${AppMachineReadableCode}', true, false)
  3. Provide a name, such as "IsBarCodeFiltered" and check to make sure the expression is of type Boolean.
  4. Save and close the dialog.
  5. Right-click the visualization, and from the menu, click Properties.
  6. In the Properties dialog, select Data.
  7. Scroll down to the box Limit data using expression and click Edit.
  8. In the Limit Data Using Expression dialog, select the column isBarCodeFiltered, and then click Insert Columns.
  9. Click OK to close and save the change, and then close the Properties dialog.

Results

When the value of IsBarCodeFiltered is set to False, all data appears. When the data is scanned using the bar code scanner, IsBarCodeFiltered is set to True and the data is limited to display the entry corresponding to the bar code.

The following image displays the table visualization in an iPad after the bar code button is pressed. The value of the code is captured, and the corresponding data is displayed.


scanned list displaying only the data corresponding to the code

The following image shows the same results in an Android device.


Barcode example on Android