# Detect Duplicate Barcodes

In the mobile app go to: Settings → Accept duplicate barcodes and pick the behavior that matches your workflow:

  • Ask every time Prompts you whenever a scanned value already appeared during the current session. Good for mixed scenarios where some duplicates are legitimate.

  • Always accept All scans are sent, even if repeated. Fastest option; no filtering.

  • Discard adjacent Ignores an immediate repeat of the previous barcode (protects against the scanner reading the same label twice while still pointing at it).

  • Discard scan session Each distinct barcode value is accepted only once for the whole session. Later repeats are silently ignored.

# Advanced (Output Templates)

For fine-grained control (e.g., blocking duplicates with custom warning messages), configure an Output Template with:

  • A BARCODE component to capture the value
  • A JAVASCRIPT_FUNCTION component to store scanned values in localStorage
  • An IF + ENDIF block to conditionally display an ALERT ("Duplicate detected – scan a different code")

This device-side logic enables duplicate prevention, operator alerts, and output suppression without requiring server connectivity.

Learn more: How to detect duplicated barcodes with Output Templates.