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.

Suggestions about creating a room scheduler

Featured Replies

Does anyone have any suggestions on how to display a list of times and date you could sign up to use a room. It would show which times had not been signed up for yet, and would not allow you to sign up for times where it was already in use (like outlook does when you try to schedule a meeting)?

Hi, army! I can't think of an easy way to what you want as you stated it, but can you turn it around to somthing simpler? For example, what if you just create a record for those days/time when the room is taken and not allow duplicates? Don't worry about showing available dates/times. Users can enter a date, and your system performs a search and shows all reservations for that day. Or if you don't want them to see other booked times, you can make it so that on a specific date/time search, the NOT FOUND error page gives a message that the room is available and gives them the opportunity to enter their info and reserve it (create new record).

search date page

> resutls page shows reservation records and times already taken

reservation page

> they can reserve a date/time and if already booked, fmp sends validation error

Hope this helps! --ST

  • Author

Hi Steve,

Yes, this sounds good, and I do want to keep it simple. Could you explain a little more about how you would design the database for the days/Time. And what do you need to do so duplicates are not allowed ?

Thanks,

Army

Hi, we've had an Intranet room booking running for some years now.

Basically, there's a single record for each day for each room. There are fields for each hour and fields for morning, afternoon and day.

Against the bookings, I use calculations to deliver a bar chart to the web page which shows the current bookings and a Javascript popup calendar to book ahead.

Using calculation fileds and "If" statements in the page, we make it impossible to book, say, a morning or all day session if there is already an hour booked in the morning etc.

Unless you make everyone log on, there's no way to stop someone deleting another person's booking and putting their own in!

Here's what it looks like:

http://www.william-reed.net/booking

regards, jeff

  • Author

That's realy cool! Did you use javascript to create the bar chart or can you do that with cdml?

Hi, sorry to be so long replying, I couldn't get to the site this morning.

The code for this is actually pretty simple as it was originally written as soon as FMP4 came out and it's not really changed much in more than four years!

The graph is the result of a find for "today". There's a table row for each room and a table column for each hour.

In the database, there's a calculation for each hour which says "if(IsEmpty(9am)and IsEmpty(allmorning)andIsEmpty(allday),"#FFFFFF","#6699CC")

Just pass that value into the table cells and use a little transparent GIF as a shim:

<TD WIDTH=18 BGCOLOR="[FMP-FIELD:BOOKED9.RAW]">

<IMG SRC="images/lineshim.gif" ALIGN=bottom>

</TD>

It works fine, although I gotta admit now that it's maybe not the most elegant way to do it!

The showing/hiding on the record detail page works in very much the same way:

There's a couple of calculation fields which hold whether there's a booking and I look those up to decide which panels to include in the page:

[FMP-IF: block.cn.am]

[FMP-INCLUDE: blank.txt][FMP-ELSE]

[FMP-INCLUDE: hoursam.txt]

[/FMP-IF]

[FMP-IF: block.cn.pm]

[FMP-INCLUDE: blank.txt][FMP-ELSE]

[FMP-INCLUDE: hourspm.txt]

[/FMP-IF]

[FMP-IF: availableam.eq.available]

[FMP-INCLUDE: am.txt][FMP-ELSE]

[FMP-INCLUDE: blank.txt]

[/FMP-IF]

[FMP-IF: blockam.eq.am]

[FMP-INCLUDE: am.txt][FMP-ELSE]

[FMP-INCLUDE: blank.txt]

[/FMP-IF]

[FMP-IF: availablepm.eq.available]

[FMP-INCLUDE: pm.txt][FMP-ELSE]

[FMP-INCLUDE: blank.txt]

[/FMP-IF]

[FMP-IF: blockpm.eq.pm]

[FMP-INCLUDE: pm.txt][FMP-ELSE]

[FMP-INCLUDE: blank.txt]

[/FMP-IF]

[FMP-IF: availableday.eq.availableavailable]

[FMP-INCLUDE: day.txt][FMP-ELSE]

[FMP-INCLUDE: blank.txt]

[/FMP-IF]

[FMP-IF: blockday.eq.ampm]

[FMP-INCLUDE: day.txt][FMP-ELSE]

[FMP-INCLUDE: blank.txt]

[/FMP-IF]

....I used FMP includes to keep the html nice and short

hope this isn't too confusing

regards, jeff

  • Author

Thanks Jeff, I can't wait to try it out!

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.