Jump to content
Sign in to follow this  
geethanandh

unique

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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/

Share this post


Link to post
Share on other sites

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... smile.gif

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.