JW Posted December 7, 2001 Posted December 7, 2001 I have a db with events - test field date from - date field date to - date field period - cac - (date to - date from) + 1 location - text field How can I prevent that a same location is used into a all ready exist daterange? Thanks JW
LiveOak Posted December 8, 2001 Posted December 8, 2001 A little complex, but it boils down to how to build a relationship between two records that have the same location and date. If you have such a relationship, then you can detect if there is already a record in the range. to build this relationship you will need a "Compound" (made out of more than one field) "multi-key" (has more than one key). A multi-key is a text field containing more than one key separated by carriage returns. For Example location = "London" date from = 12/1/2001 (MM/DD/YY in the US) date to = 12/5/2001 Key = London12/1/2001 London12/2/2001 London12/3/2001 London12/4/2001 London12/5/2001 If you build a self relationship between two records using this "Key" any records with an overlapping location/date will be related and can then be detected. You will probably have to build this key with a looping script or a plug-in. -bd
Recommended Posts
This topic is 8457 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