# Scan

## Overview

Labii includes built-in barcode and QR code scanning to help you find records or add records faster.

You can use either your device camera or an external scanner.

## Scan page

Use the Scan page to scan barcodes or QR codes directly.

{% stepper %}
{% step %}
Click **Scan** in the navbar.
{% endstep %}

{% step %}
Select your input source (camera or external scanner).
{% endstep %}

{% step %}
Scan the barcode/QR code.
{% endstep %}
{% endstepper %}

Once the scan is completed, Labii executes the configured post-scan action.

### Scanning equipment

Labii supports both built-in cameras and external commercial scanners.

* **Camera**: Scan using the camera on your laptop, tablet, or phone. On mobile devices, you can choose front or back camera.
* **Scanner**: Use any compatible external scanner by connecting it to your device and scanning directly.

### Action after scan

You can configure what happens after each scan:

* **Append to list**: Adds results to the right panel for bulk processing.
  * Bulk edit, same as [Batch operations](https://docs.labii.com/list-view/bulk-operations#bulk-edit)
  * Bulk print, same as [Batch operations](https://docs.labii.com/list-view/bulk-operations#bulk-print)
  * Actions, same as [Batch operations](https://docs.labii.com/list-view/bulk-operations#bulk-export)
  * Open list view
  * Clear
* **Open in new**: Opens the matched result in a new tab.
* **Open in current**: Opens the matched result in the current tab.

<figure><img src="https://3607108856-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LHVg57XIRcjV-Vbubtn%2Fuploads%2Fgit-blob-c5584ceb58808f11fd6e36197bdf1eeb53d12013%2Fscan-page.webp?alt=media" alt=""><figcaption></figcaption></figure>

## ForeignKey(s)

[ForeignKey](https://docs.labii.com/widgets/column-widgets/form/dropdown#foreignkey) and [ForeignKeys](https://docs.labii.com/widgets/column-widgets/form/dropdown#foreignkeys) widgets also support scanning, so you can select records automatically.

Example: to assign a storage box to a sample, scan the storage box barcode from the ForeignKey(s) widget.

{% stepper %}
{% step %}
Open a form that contains a [ForeignKey](https://docs.labii.com/widgets/column-widgets/form/dropdown#foreignkey) or [ForeignKeys](https://docs.labii.com/widgets/column-widgets/form/dropdown#foreignkeys) field.
{% endstep %}

{% step %}
Open the scanner from that field.
{% endstep %}

{% step %}
Scan the target record barcode/QR code to select it.
{% endstep %}
{% endstepper %}

<figure><img src="https://3607108856-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LHVg57XIRcjV-Vbubtn%2Fuploads%2Fgit-blob-aed9f6db787e69dfa535e1b49b043372c6416f5b%2Fscan-foreignkey.webp?alt=media" alt=""><figcaption></figcaption></figure>
