Record your interval in two fields: StartYear, EndYear.
To search for all records where 2004 falls in that interval enter criteria in both fields:
Put >2004 in EndYear and <2004 in StartYear.
Then perform your find.
This can be done manually or in a script.
I infer I cannot use just one field for it. Most of the recorded events only last one year, for this reason it would be not economic to add one field just for a bunch of cases...
- Adding more fields is pretty "cheap". single year intervals would put the same year in both fields. A replace fields operation can update the newly added field in one batch operation to update existing records.
- A script could also be crafted that finds all records where start year = the specified year and then also finds all records where the there is a value in both fields and the specified year falls on the interval. That approach eliminates the need to enter a value in the second field for one year intervals. This can be done with two "requests" in the same find or by performing the first find, returning to find mode and then using "extend found set" to add the rest of the records to those found by the first find.
- What you describe could be done with a text field that stores the range, but it would be pretty slow as you'd need to set up a looping script that loops through all your records and evaluates the range against the specified year one record at a time instead of performing a find for it.
To get all the dates with the year 2004 just enter 2004 in the date field. To enter an interval use the ellipsis or three periods ... between the two values. 2003...2005 will give you all the dates that the years is between that interval inclusive, ie, all dates with the years 2003, 2004 and 2005.
You only need to enter the years and FMP will add the month and day for you, it is the same as entering */*/2003...*/*/2005.
The ellipsis also works for numbers and text.
Yep, do that all the time. But our poster wanted to do the reverse, to specify a year as the criteria with different intervals recorded in each record...
Actually, it is as Phil said. I need the reverse. I think I'll go for the double field, or I will put, let's say "2001, 2002, 2003, 2004" in the year field. This way I assume, even if a bit ugly to see, it could do the trick.