AnsweredAssumed Answered

Need Help on Search for Duplicates Using Scripts

Question asked by ManuelJrMendoza on Jul 28, 2015
Latest reply on Jul 28, 2015 by philmodjunk

Summary

Need Help on Search for Duplicates Using Scripts

Product

FileMaker Pro

Version

12

Operating system version

Mac

Description of the issue

I am not sure if this is an issue but I am having difficulty creating a script to search for duplicates. 

Here are the data fields:
1. Account Number
2. UserName
3. Date Scanned
4. Time Scanned

Here is the logic:
1. Account number is scanned using bar code scanner.
2. Perform find
3. If there is a duplicate account number, that scanned account number is rejected.
4. If there is no duplicate account number, that scanned account number is saved.
5. Then moves to next account number.

Steps to reproduce the problem

Go to Layout
Set Error Capture [On]
Set Variable
Enter Find Mode
Set Field
Perform Find
If [Get (LastError) > 0]
     Show Custom Dialog (...
     If [Get (Last MessageChoice) = 1]
         Modify Last Find
     Else
         Enter Browse Mode []
     End If
End If
Set Error Capture [Off]

Expected result

It should be able to find out if the scanned account number has duplicates.  If it has duplicates, reject the account number.  If no duplicates, save it.

Actual result

It just stops at Enter Find Mode.

Outcomes