Zero Tolerence Posted August 25, 2006 Posted August 25, 2006 I've never actually used the Calculation part of field validation, but here's what I'm wanting to do. I have a tasks table, inside that table I have a Date Field, a Start Time Field, and an End Time Field. No records start time and end time can overlap another records. And I need a way to check for that. Sure, I could use a script to do this, searching by date and then checking the times recrod by record. But then I got to thinking about List and GetNthRecord functions and wondered if this might be possible in a calculation. Just wondering what a few of the more experienced users think here.
comment Posted August 25, 2006 Posted August 25, 2006 I think I would define a self-join relationship between overlapping records, excluding the current record (by adding SerialID ≠ Overlap::SerialID). Then you can validate by not Overlap::SerialID
Søren Dyhr Posted August 25, 2006 Posted August 25, 2006 I think I would define a self-join relationship Wouldn't it be self-joins in plural, since stacking with OR havn't found it's way into relations def... ? --sd timespans.zip
comment Posted August 25, 2006 Posted August 25, 2006 Wouldn't it be self-joins in plural I don't think so. ValidateOverlap.fp7.zip
Zero Tolerence Posted August 26, 2006 Author Posted August 26, 2006 Brilliant comment. I still don't quite understand how the "not Overlap::SerialID" is how it validates though. Mind dumbing it down a bit for me :/
comment Posted August 27, 2006 Posted August 27, 2006 "not Overlap::SerialID" means there's no related record in the Overlap TO. Unless you do have a record that overlaps, but it doesn't have a SerialID, or has a zero as its SerialID value.
Recommended Posts
This topic is 6920 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