Jump to content

Suggestions about creating a room scheduler


This topic is 7368 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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)?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This topic is 7368 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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