• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • Data Sources
    • CSPro Statements and Functions
      • Statement Format Symbols
      • Alphabetical List of Functions and Statements
      • List of Reserved Words
      • Deprecated Features
      • Declaration Statements
      • Symbol Functions
      • Item Functions
      • Array Object
      • Audio Object
      • Barcode and QR Codes
        • Barcode Namespace
        • Barcode.read Function
        • Barcode.createQRCode Function
      • Case Object
      • Document Object
      • File Object
      • Freq Object
      • Geometry Object
      • HashMap Object
      • Image Object
      • List Object
      • Map Object
      • Path
      • Pff Object
      • SystemApp Object
      • ValueSet Object
      • Program Control Statements
      • Assignment Statements
      • Data Entry Statements and Functions
      • Batch Edit Statements
      • Numeric Functions
      • String Functions
      • Multiple Occurrence Functions
      • General Functions
      • Date and Time Functions
      • External File Functions
      • Synchronization Functions
    • Templated Reporting System
    • HTML and JavaScript Integration
    • Action Invoker
    • Appendix
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataViewer>
  • <TextView>
  • <TblView>
  • <CSFreq>
  • <CSDeploy>
  • <CSPack>
  • <CSDiff>
  • <CSConcat>
  • <Excel2CSPro>
  • <CSExport>
  • <CSIndex>
  • <CSReFmt>
  • <CSSort>
  • <ParadataConcat>
  • <ParadataViewer>
  • <CSCode>
  • <CSDocument>
  • <CSView>
  • <CSWeb>

Barcode.read Function

Format
s = Barcode.read(ʃmessageʅ);
Description
The Barcode.read function starts an Android device's camera and allows the operator to scan a barcode. The barcode can be in several formats, including QR codes. An optional string expression, message, is displayed on top of the camera view and can be used to display instructions to the operator.
This function only works on Android devices and returns a blank string if used on another device.
Return Value
The function returns a string value containing the barcode's value. If the operator canceled before a barcode could be successfully read, the function returns a blank string.
Example
PROC BLOOD_SAMPLE

preproc

   
if BLOOD_SAMPLE = "" then
        BLOOD_SAMPLE = 
Barcode.read("Scan the blood sample barcode");
   
endif;
See also: Barcode Namespace, Barcode.createQRCode Function, Barcode Capture Type