ISBN search using Camera

Title

ISBN search using Camera

Post

I am very new to file maker, but I am finding it very useful, and user friendly. I am in the book trade and I am using it to keep track of the books I have on hand. I have created a layout that will show me all the information I need to know about my inventory.

When I am purchasing I use an ipad or iphone and need to quickly search by Author or ISBN (barcoded). I would to know how to write a script that will allow me to search the ISBN by scanning the barcode with the camera in the iOS device. If it returns no results then I would like to search by Author. If it returns no results then I would like to add the ISBN to a new table. If anyone can help with this I would really appreciate it!

Define a global text field, gBarcode and put it on a field somewhere. Run this script to search your table for records with that barcode:

Go to Layout ["BarcodeLayout" ( globalsTable ) ] ---> go to the layout where you have placed gBarcode.
Insert From Device [---> select the options needed for bar code scans and specify gBarcode as the field into which to insert the scanned text.
Commit Records
Go to Layout [Select layout that you plan to use to show your find results here]
Enter Find Mode [] ---> clear pause check box
Set Field [YourTable::barcode ; Globals::gBarcode ]
Set Error Capture [on]
Perform Find []
If [ Not Get ( FoundCount ) // no records found ]
Do what you want when no item with this bar code is found
End If

Note: there's a bug that has been identified in Insert From Device when using the camera to take pictures and to scan bar codes at the same time:

Define a global text field, gBarcode and put it on a field somewhere. Run this script to search your table for records with that barcode:

Go to Layout ["BarcodeLayout" ( globalsTable ) ] ---> go to the layout where you have placed gBarcode.
Insert From Device [---> select the options needed for bar code scans and specify gBarcode as the field into which to insert the scanned text.
Commit Records
Go to Layout [Select layout that you plan to use to show your find results here]
Enter Find Mode [] ---> clear pause check box
Set Field [YourTable::barcode ; Globals::gBarcode ]
Set Error Capture [on]
Perform Find []
If [ Not Get ( FoundCount ) // no records found ]
Do what you want when no item with this bar code is found
End If

Note: there's a bug that has been identified in Insert From Device when using the camera to take pictures and to scan bar codes at the same time:

The only problem with this is I need to be able to move between fields on this layout without running the script. if I set it up the way you have described if I click or tab to another field it runs the script. Is there a way I can set it to trigger a script specifically when enter is pressed within that field?