Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

  • Newbies

Hello, everyone.

This is my first time in the forums, and I am fairly new to Filemaker. My boss wants me to design a simple database that can keep schedules for 4 rooms.

Where I am coming into problems is on the date and time validations. I am trying to figure out how to restrict someone from entering a reservation on the same time and date as another record for the same room.

If this is not the right topic for this, sorry, please point me in the right direction.

You'll need a self-join relationship, where the relationship is composed of Date, Time Start, Time End, and Room. It would look something like this:

Reservation::Date = Reservation 2::Date

AND Reservation::Time Start <= Reservation 2::Time End

AND Reservation::Time End >= Reservation 2::Time Start

AND Reservation::Room = Reservation 2::Room

If there are related records, then there is already a reservation on that Date for that Room that overlaps the time range.

You can check out the demos and discussion about trying to create recurring events with this type of system while avoiding conflicts here:

http://www.fmforums.com/threads/showflat...e=0&fpart=2

Note that it's not necessary to use Smart Ranges or custom functions to do the basic range to range relationship here.

  • Author
  • Newbies

Thanks for the quick reponse.

Currently I am trying to do one table for all of the rooms. Do I need to make a seperate table or even seperate file for each room? Relationships don't seem to work with the 2 tables.

Customer table and the Rooms table.

And on the form I can get it to popluate but it still lets me enter in the same time on the same day for the same room.

Where would I put this in

Reservation::Date = Reservation 2::Date

AND Reservation::Time Start <= Reservation 2::Time End

AND Reservation::Time End >= Reservation 2::Time Start

AND Reservation::Room = Reservation 2::Room

is that a script off of the accept reservation button.

Sorry for being such a newbie at this.

Thanks again for your help.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.