Using scripted solution:
- copy start and end dates from the new record
- open another window off screen and search your records
- if found anything - fail validation, overwise - pass
- close the temp window, select source window
You can build the search criteria with extra Find Requests and omissions to do it in one line
It sounds to me that you do not want a record to be created until the previous record has been completed.
In that case you could script the new record button to verify that all records have an end date < current date and that all end dates are not null.
Thanks Silas. But the current date is not really a factor in this situation. The date range a record represents could be any date range, I just need that date range to be unique/not overlap with any other record's range.
It is possible in your solution for the following to happen?
Record 1: 1/1/2015 - 2/28/2015
Record 2: 4/1/2015 - 5/30/2015
Record 3 : 3/1/2015 - 3/31/2015
Also is it possible for anyone to start a new record prior to and end date being populated?
Thanks nicolai. This is going to be on iOS so I'd like to minimize the leaving the current layout etc. I know I can freeze the window and it would probably be quite quick. Are there options to use eSQL to see if the date in Start or the date in End is within the range of another record's dates perhaps?
Yes it is possible (unlikely, but possible so we have to go the extra mile to account for it... ). Those records could be created in that order with those date ranges as they don't overlap.
It is not possible for a new record to be created before the current record has a start and end date populated.
WHERE start<=? AND end>=?
";"";"" ; end for test ; start for test)
You could use a validation with eSQL to verify that the dates are not in use.
Where StartDate <= 'CurrentRecordStartDate' and
EndDate >= 'CurrentRecordStartDate'" ,"","");
Where StartDate <= 'CurrentRecordEndDate' and
EndDate >= 'CurrentRecordEndDate'" ,"","")
Case( SD > 0 ; "Error: Start date is in the range of another record ";"") &
Case( SD > 0 and ED > 0 ; "¶";"") &
Case( ED > 0 ;"Error: End date is in the range of another record";""))