Go To Layout [barcodeScans]
Set Error Capture [ on ]
Insert From Device [ barcode type ; barcodeScans::barcode field ]
Exit Loop If [ get(lasterror) = 1 ]
Delete Record [ no dialog ]
---Do other stuff after completion---
The key is exiting the loop if the barcode scan is cancelled by the user. Otherwise it will keep looping, creating a record and bringing up the barcode scanner, until it is cancelled. The last delete record step is to delete the remaining blank record that was cancelled.
Insert From Device was introduced in FMGo 13, barcodes could be scan in FMGo 13. The camera will stay active until you scan a barcode or cancel the scan.
Here is a sample created in 13, it works the same in 14.
If you are referring to scanning multiple codes at once then setup a loop as Mike has suggested.
Thanks Mike and schamblee. Interesting to know that FMGo13 offered the same ability. Regardless thanks for the help and sample file. I will give them a go, report back, and share any success I have for others.
Thanks to all for the help and solution. I've integrated the script bits into my solution and it works perfectly. Thanks!