AnsweredAssumed Answered

Inappropriate Field Type Error when Scanning Barcodes (QR) - Filemaker GO 14

Question asked by jrepp on Mar 10, 2016

I have a file where I created several hundred QR codes for tracking test samples, which are graphical representations of the primary key (UUID).  I originally created this in Filemaker 12 and Filemaker Go 12, so at that time I used the CNS Barcode iOS app to read the barcode and populate a foreign key text field (which is on the layout that I am scanning the barcode from, represented as a popup list, so if there is an error I can select the correct sample ID).  Now that barcode scanning is native I tried to update the script to do this within Filemaker.  I cannot get this to work.  I can still use CNS Barcode and scan fine, but I wanted to streamline this so if someone else uses the file they don't need this on their iPad/iPhone.


The field is a text field (not global) that is indexed.  I have tried using the field as a text entry and popup list on the layout, but neither has worked.  The labels used contain QR codes and I tried limiting to just scanning QR codes as well as left it open to scan everything.  I tried deleting and recreating the entire script, since I've personally found that sometimes things just get screwy the more you edit something, but that hasn't worked.


Any thoughts or ideas would be appreciated.


Below is my script...


If [ Get (SystemPlatform) = 3]

     New Record Request

     Go to Field [Select/Perform ; Inspection::fkSampleID]

     Insert From Device [Type:  Bar Code; Camera: Back; Resolution: Full]


     Set Field [Inspection::fkSampleID; CNSBC_ScanWindow("Show"; "ReturnExample")]

End If

Go to Object [Object Name: "Label"]


I check to see if I am on iOS before creating a new inspection record and trying to insert a barcode.  The Else section is for the CNS Barcode plugin.  The Go to Object step is to supress the iOS keyboard by going to a lable field.


Thanks again for your help.