Can you check for each individual day within the period? So, if the enquiry is from the 1st to the 14th, can you break it down and check the number available on the 1st, and the 2nd, 3rd...14th. Then take the Minimum of those availabilities? You could presumably capture also which day(s) equal the minimum, to point a Human at where to go and look for manoeuvering.
Thanks for your suggestion Sorbsbuster.
I think that might be the only way to make this work.
Now I'm using a portal with a few relatinships to immediatly display all of the equipment that's available between any given date range.
I guess that system you suggest would be the other way around. First you determine what yo want and then filemaker checks if that's possible.
That's somethink I will have to take a good look at.
There's a custom function out there (and it's quite simple to re-invent from scratch) that takes two dates and produces (via recursion) a return separated list of dates spanning that date interval. That can be a useful tool for relationships that have to match on date ranges by using a field with the return separated list of dates as a match field to a regular date field in a relationship.
I think I've seen this function before in an example file from Nightwing's website.
The problem is that equipment can be returned on a certain day at 10am and be rented out again at 4pm.
So on one particular day items can come and go.
That's why I'm using timestamps and relationships to look for when items are available or not.
I think this is a problem that's not going to be solved easily.
My 'brute force' suggestion might still work if you checked against a Timestamp on the first day and last day.