1 Reply Latest reply on Apr 9, 2013 9:20 AM by philmodjunk

    Catching Duplicate Record



      Catching Duplicate Record


           Using Fm unique name option for a name field, is there a way to use a Custom dialog box for reply rather than the "revert record, yes, no" box and then the next revert box that pops up. I would  like to make it more "fool proof". If you enter a dup name I highlight all the portal fields that have matching last name and bring them to the top of the portal. We are a Kitchen remodel showroom and for our Clients, (people who have hired us) it is easy because they always give correct and complete info, but this for our contact list where sometimes they will only give a work nbr or a cell nbr so I cant cross check those nbrs or address. Any info will be appreciated 

        • 1. Re: Catching Duplicate Record

               If you are using Filemaker 11 or newer, you can use the OnObjectValidate trigger to run a script that:

               Uses Set Error Capture to suppress error messages

               Commits the Record

               Uses Get (LastError) to check for a validation error

               Then displays a custom dialog explaining the error

               and reverts the record for the user--elminating the rather confusing revert dialogs.


               uses Exit Script [false] to cancel out of the script, returning the user to the field--where they can correct the error with the record still opened for editing.