When you want to accumulate several of the same kind of thing, you're usually better off storing the data in separate records — perhaps child records of a single parent record — rather than aggregating everything in a single field. Can you describe why you want the scanned values to all appear in a single field?
If it turns out that it really is the right thing to do, you could scan each barcode using Insert from Device into one field, then accumulate the scans into a separate field:
Insert from Device [Table::scan...]
Set Field [Table::combined; Table::combined & ", " & Table::scan]
We have a toggle on our scan file - single or batch. We choose batch our press check scans - typically 8-12 scans on a press sheet. Single is default and always creates a new record on scans, but for press sheets we like to have all results visible so we keep all in the same record.
Set a variable of the current contents of the field first & also check to see if there are current contents in that field
Set Variable [$previous ; Value: If ( IsEmpty ( Barcode Scanner::bc ) ; "" ; Barcode Scanner::bc & "¶" ) ]
Perform the scan event, and set a variable $new to the result.
Then you can combine the two variables in a Set Field step; $previous & $new.
I also check to see which camera is the default but not necessary if you're always using just front or back.
I was thinking of setting a variable originally, and I modified what you posted to end up with:
If [ IsEmpty ( Table::Barcode ) ]
Insert from Device [ Table::Barcode; Type: Bar Code; Camera: Back; Resolution: Full ]
Set Variable [ $current; Value:Table::Barcode ]
Insert from Device [ Table::Barcode; Type: Bar Code; Camera: Back; Resolution: Full]
Set Variable [ $new; Value:$current & ", " & Table::Barcode ]
Set Field [ Table::Barcode; $new ]
There might be a more elegant way to do it, but this works great. Thanks!
Good stuff! Glad I could help~ T