Can you explain what you mean by overlapping?
- Matching start and end dates?
- Matching start or end date?
- Start date between an existing start and end date?
- End date between an existing start and end date?
Here is an example that can be used in a Formula - Checkbox field to indicate if the entered start and end dates both fall within an existing range.
// Define Variables
var date startDate = [Start Date];
var number startDateFID = 13; // Field ID of the above field
var date endDate = [End Date];
var number endDateFID = 14; // Field ID of the above field
// Define Query
// Searches for existing records where the [Start Date] is BEFORE the current record [Start Date] and the existing [End Date] is AFTER the current [End Date]
var text query = "{" & $startDateFID & ".BF.'" & $startDate & "'} AND {" & $endDateFID & ".AF.'" & $endDate & "'}";
// Run the query and count the results. If the query returns a result, tick the checkbox
If (Size(GetRecords($query)) > 0, true)
------------------------------
Matt Hardy
------------------------------