August 25, 200619 yr 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.
August 25, 200619 yr 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
August 25, 200619 yr 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
August 26, 200619 yr Author 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 :/
August 27, 200619 yr "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.
Create an account or sign in to comment