August 19, 200223 yr Newbies hello How to make the combination of three fields to be unique. bye geethanandh
August 19, 200223 yr thats quite a large question. It despends on where the 3 fields come from? Why? When? etc. Run a search on making unique serial numbers on this forum, its a never-ending discussion.
August 19, 200223 yr Do a search in FileMaker Inc's TechInfo Library for "validating calculation fields" it'll tell you how to do it. It works. http://www.filemaker.com/
August 20, 200223 yr One way to do this would be to: 1. Create a stored calculating field (result type Text) called "CompositeKey" with a formula which concatenates your three fields, viz: Field1 & Field2 & Field3 2. Create a value list called "Unique Keys" which uses values from the "CompositeKey" field. 3. Validate each of the three data entry fields (Field1, Field2 and Field3) with the formula: not PatternCount(ValueListItems("YourDBname.fp5", "Unique Keys"), CompositeKey) The result of this will be that although non-unique values will be able to be entered into the individual fields, values which combine with other values to generate a non-unique value in the 'CompositeKey' field will be rejected. You might want to consider making the validation strict and adding an appropriately informative custom message...
Create an account or sign in to comment