Lawlerdev Posted April 8, 2002 Posted April 8, 2002 I am trying to validate the uniqueness of 2 fields entered into a client database. For example the 2 fields are First Name and Surname. The next time I create a new record I want the database to use the validation option to check if the combination of these 2 fields is unique and give a warning. I don
Vaughan Posted April 8, 2002 Posted April 8, 2002 You really want to validate a calculation field (=firstname & surname) but FMP does not natively do this. However there is a TechInfo article describing such a technique. Go to the TechInfo database on the FileMaker Inc web site (probably under support) and search for "validating a calculation field" or something similar.
djgogi Posted April 8, 2002 Posted April 8, 2002 quote: Originally posted by Vaughan: You really want to validate a calculation field (=firstname & surname) but FMP does not natively do this. However there is a TechInfo article describing such a technique. Go to the TechInfo database on the FileMaker Inc web site (probably under support) and search for "validating a calculation field" or something similar. I didn't check if such article exists but here's what I've done: Create an calc field with result text: code: unique=name & Length(name)&surname & Length(surname) make it indexed and check the option "Do not evaluate if all referenced fields are empty" and make sure that you've selected "not empty" the validation for name and surname. Than make an self-relation Validator::unique->unique. Define field "status" as text and autoenter look-up from field unique from self relation Validator with option "don't copy if no match" checked. Create validation by calculation for this field as: status!= unique and uncheck option "validate only if field has been modified" In the validation panel check strict and custom message Now. put those fields on your layout. Put the field status behind name or surname and uncheck " allow field entry" and make the the text color same as background(or make the background color of overlaying field to some color). Ommit status field from tab order for this layout: you have to have fisically field "status" on your layout or yoy'll end up with an non overriding message from FM. HTH Dj [ April 08, 2002, 04:55 AM: Message edited by: dj ]
djgogi Posted April 8, 2002 Posted April 8, 2002 I've just checked FM site and yes there are few TECHINFO on this topic. Here's one that more or less I've implemented validate calc field Dj [ April 08, 2002, 05:05 AM: Message edited by: dj ]
Lawlerdev Posted April 8, 2002 Author Posted April 8, 2002 Thank you very much for your help, I looked up the Tech info CD and there it was.
Recommended Posts
This topic is 8265 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now