AnsweredAssumed Answered

Barcode Script to find records

Question asked by JoshO'Brien on May 7, 2014
Latest reply on May 12, 2014 by JoshO'Brien


Barcode Script to find records




     I am new to filemaker development so will describe step by step what we are trying to do.


     we wich to use filemaker go on the iPhone to scan an asset tag and return the record its associated with if no record is found a new record is created with the barcode info populated in the correct field.


     we have an older version that worked using an external barcode reader app but we would like to use the barcode scanning within filemaker to avoid paying for the barcode app.

     the original scripts for this process were broken into three steps.

iPhone Asset search from scan:
     Set Error Capture [On]
     Set Variable [$$FAN]
     Show All Records
     Set Variable [$$FAN; Value:Get ( ScriptParameter )]
#Find if Workstation
     Go to Layout [“Asset Details | iPhone” (Assets)]
     Perform Find [Restore]
     If [Get ( LastError ) = 401]
     Show Custom Dialog [“None Found”; “There are no assets found with that tag. Would you like to add a new one?”]
     If [Get ( LastMessageChoice ) = 1]
     Perform Script [“Scan_return”]
     End If
     End If
     Set Variable [$$FAN]
Scan Return
     New Record/Request
     Set Field [Assets::Internal ID; $$FAN]

     Now i don't know if these can be adapted to use the newer option 

     Insert from Device [Assets::Internal ID; Type: Bar Code; Camera: Back; Resolution: Full]

     or if its better to create new scripts from scratch.

     Any help will be very much appreciated.