![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, When a reservation i done, a script loops through a repeating field with 366 repetitions that represents the days that is blocked out. Then when I search for a available cabin, a search goes to the repetitions on the cabins and omits all cabins with blocked out repetitions for that timespan. |
#3
| |||
| |||
|
|
On Mar 26, 8:02*am, Nicolay <nicolay.flaa... (AT) gmail (DOT) com> wrote: Hello, When a reservation i done, a script loops through a repeating field with 366 repetitions that represents the days that is blocked out. Then when I search for a available cabin, a search goes to the repetitions on the cabins and omits all cabins with blocked out repetitions for that timespan. Nic, You've dug yourself a hole by using repeating fields for this. The best thing to do is get out and fill it in. Drop the repeating fields and use a separate table to hold reservation records. Each record in that table would have fields for Date and Cabin Number and Is Reserved. DJ |
#4
| |||
| |||
|
|
On Mar 28, 4:39*pm, David Jondreau <da... (AT) wingforward (DOT) net> wrote: On Mar 26, 8:02*am, Nicolay <nicolay.flaa... (AT) gmail (DOT) com> wrote: Hello, When a reservation i done, a script loops through a repeating field with 366 repetitions that represents the days that is blocked out. Then when I search for a available cabin, a search goes to the repetitions on the cabins and omits all cabins with blocked out repetitions for that timespan. Nic, You've dug yourself a hole by using repeating fields for this. The best thing to do is get out and fill it in. Drop the repeating fields and use a separate table to hold reservation records. Each record in that table would have fields for Date and Cabin Number and Is Reserved. DJ Hello DJ, I agree with you that repeating fields is not a ideal solution, and I only have this as a search tool, that I agree is not optimal. I already have the reservation records table in the booking line items, because this contain date and product ID and is Reserved status. But how can I search out Products or show them in a portal when I enter arrival date and departure date in a search and I will get the products that have no reservations in that period? I think this have to be done in a join table between reservation_lineitems withe the dates and the product table. I would like to find a way to find join tables that have no reservations for a specific date period, but how? Do you recommend another approach? I got a tip that maybe relations could be the fastest way. Nicolay |
#5
| |||
| |||
|
|
It seems to me you can do this with a simple find. You have Cabins and you have Reservations, no? And Reservations are related to Cabins by Cabin ID or some such. From the Cabins layout find on the related Reservations table. It's unclear how your Reservations are set up, but a regular find or an "Omit" find should work. |
)
#6
| |||
| |||
|
|
It seems to me you can do this with a simple find. You have Cabins and you have Reservations, no? And Reservations are related to Cabins by Cabin ID or some such. From the Cabins layout find on the related Reservations table. It's unclear how your Reservations are set up, but a regular find or an "Omit" find should work. |
)
#7
| |||
| |||
|
|
"David Jondreau" <david (AT) wingforward (DOT) net> wrote in message news:fe38923f-0f74-4493-a469-cbd42235bd74 (AT) l2g2000prg (DOT) googlegroups.com... It seems to me you can do this with a simple find. You have Cabins and you have Reservations, no? And Reservations are related to Cabins by Cabin ID or some such. From the Cabins layout find on the related Reservations table. It's unclear how your Reservations are set up, but a regular find or an "Omit" find should work. The original person isn't search for existing data, but for a gap between existing booked dates big enough to fit a new reservation. Unfortunately that's not so easy and can really only be done with a looping Script - whether you use awful Repeating Fields or a separate Table. Technically you could probably set-up a Field to calculate how many days between each record's booking and the next record's booking, but it's probably not worth the all the effort ... you wouldn't gain much in terms of overall speed since the database would have to keep re-calculating those values. Helpful Harry ) |
ateEnd
ateStart
#8
| |||
| |||
|
|
Hello, I have a reservationsystem in Filemaker. When a reservation i done, a script loops through a repeating field with 366 repetitions that represents the days that is blocked out. Then when I search for a available cabin, a search goes to the repetitions on the cabins and omits all cabins with blocked out repetitions for that timespan. Any idea to solve this smoother? |
#9
| |||
| |||
|
|
"David Jondreau" <da... (AT) wingforward (DOT) net> wrote in message news:fe38923f-0f74-4493-a469-cbd42235bd74 (AT) l2g2000prg (DOT) googlegroups.com... It seems to me you can do this with a simple find. You have Cabins and you have Reservations, no? And Reservations are related to Cabins by Cabin ID or some such. From the Cabins layout find on the related Reservations table. It's unclear how your Reservations are set up, but a regular find or an "Omit" find should work. The original person isn't search for existing data, but for a gap between existing booked dates big enough to fit a new reservation. Unfortunately that's not so easy and can really only be done with a looping Script - whether you use awful Repeating Fields or a separate Table. Helpful Harry * ) |
#10
| |||
| |||
|
|
On Mar 31, 12:22Â*am, "Your Name" <your.n... (AT) isp (DOT) com> wrote: "David Jondreau" <da... (AT) wingforward (DOT) net> wrote in message news:fe38923f-0f74-4493-a469-cbd42235bd74 (AT) l2g2000prg (DOT) googlegroups.com... It seems to me you can do this with a simple find. You have Cabins and you have Reservations, no? And Reservations are related to Cabins by Cabin ID or some such. From the Cabins layout find on the related Reservations table. It's unclear how your Reservations are set up, but a regular find or an "Omit" find should work. The original person isn't search for existing data, but for a gap between existing booked dates big enough to fit a new reservation. Unfortunately that's not so easy and can really only be done with a looping Script - whether you use awful Repeating Fields or a separate Table. Helpful Harry Â* )Harry, It's not clear why you think a Find will not work. Nic likely has one of two set ups. Either the Reservations records have a Start and End Date or there's a Reservation record for each date. Either way he needs a layout based on a Cabin's TO, which is related to the Reservation's TO. In the first case, Nic needs to write a Find that using three *Omit* requests with data in the *related* Reservations table: 1) the Arrival Date is greater than a Reservation's Start date and less than its End date. 2 ) the Departure Date is greater than a Reservation's Start date and less than its End date. 3) The Arrival Date is less than a Reservations Start Date, and the Departure Date is greater than the Reservation's End Date. Any Cabins that meet those criteria are omitted and you're left with a found set of available Cabins. In the second case, he needs to write a Find that will Omit any cabins that 1) the New Start Date is less than the Reservations Date and the New End Date and greater than the Reservations Date. When using "greater than" or "lesser than" here, substitute greater "or equal to" as your business dictates. DJwww.wingforward.net |
ato_fra[]; " ≤ " & $gStart]
ato_til[]; " >" & $gStart]
ato_fra[]; "<" & $gEnd]
ato_til[]; " >" & $gend]
ato_fra[]; " ≥ " & $gStart]
ato_til[]; "<" & $gEnd]![]() |
| Thread Tools | |
| Display Modes | |
| |