a barcode is just a representation of a 'value'. Could be a name, an ID, etc.
For example, You can insert a barcode into a global field - and then run a script that searches for that value in the desired field
Did you specify the field to insert to in the script step?
Or you could have it like this:
Enter Find Mode
Go To Field ( your barcode field )
Insert From Device ( barcode )
Or use a global field to accept the barcode, then script the find as Markus suggested.
Are the barcodes stored as text or image in a container?
For this to work the field that accepts the barcode should also be of text type.
If it's a container then an image will be inserted instead.
I believe the field also has to be visible on the layout for this to work.
You might sometimes use a hidden global field to do a fined. But with Insert from device that might not work.
If you are using an iPad or iPhone you can use the camera of the device to read the bar code.
There is a Filemaker Script step for this "Insert From Device"