Newbies Tommo Posted April 7, 2004 Newbies Posted April 7, 2004 I found a way to enter First and Surname into two fields and have FMP check them for both being unique in real time. The solution involves the Status(CurrentFieldName) command. This can be used to perform a calculatopn ONLY if you are currently in a specified field. Your file has the following fields: First Surname Address You will also need to create the following calculation: FullName (Calculation, Text result) = Name & Surname Next create a self-join relationship based on FullName. This is a relationship in which the master file and related file are the same database file. To create a self-join: 1. In the current file, choose File menu > Define Relationships. Or, choose Define Relationships from the relationship list. 2. In the Define Relationships dialog box, click New. 3. In the dialog box that appears, double-click the name of the current file. 4. In the Edit Relationship dialog box, for Relationship Name, type a unique name for the relationship, for example
Oldfogey Posted April 7, 2004 Posted April 7, 2004 That's really neat! Suggested modification - Case((Status(CurrentFieldName) <> "First") and (Status(CurrentFieldName) <> "Surname"), Case(FullName=SelfJoin::FullName,"Warning Duplicate Name",""),"") This caters for files with more than three fields.
Recommended Posts