Newbies Marco D Posted December 4, 2007 Newbies Posted December 4, 2007 I am building a restaurant's reservation system as a VTC 'term project' for our family restaurant. I published 2 posts on this topic in 'relationships' and I will add this one in 'portals' and one in 'layouts'. Basically, I used John Mark Osborne's Calendar tutorial in order to build our 'DAYS' table. Then I created a 'TABLES' table (of the restaurant), a CLIENTS table and a RESERVATIONS table. I was able to create a quick reservation 'list' layout on a daily basis, and also add a calculation field to JMO's monthly calendar portals to show the total reservs count for any given day. Where I fail, is when I try to create a daily 'floor plan', where I would see the restaurant's 32 tables as 32 small portals (showing 2 reservations rows, and a scroll-bar if needed). I want out floor plan to look some what like this, in a 4-columns view: Table 1 17h30 #Guests GuestLastName 20h15 #Guests GuestLastName Table 2 18h30 #Guests GuestLastName Table 3 etc. I tried using a portal filtering portal using a xTable global field as I found in here, and it works if I type in the table I want to view in my layout's xTable field. But it doesn't allow me to create 1 portal for each table. What's the technique or ER diagram I should use in order to be able to do this ? Is portals my way to go ? Or should I consider using a lookup or a more static report ? In any case, I would like to be able to click on a reservation and have the reservation's details in a popup window. Any help or guidance in achieving this will be greatly appreciated. Thanks in advance! Marco
Søren Dyhr Posted December 4, 2007 Posted December 4, 2007 You can't really have portal in portals, so you need to split the interface into two, it's correct that JMO's calendar should make the first stop in the workflow, but you do then need to have have a button taking you to that particular day in an identical relational structure another Anchor Buoy where the days now are replaced by the seatings, you would then need yet another sandwiched layer to keep the actual positions from flowing together. Since JMO made the template have conditional formatting made things easier, and you could then change the invisible button in the date interface to redden according to how occupied the seatings are in the next layout. --sd
Newbies Marco D Posted December 4, 2007 Author Newbies Posted December 4, 2007 Sorry, maybe my first post wasn't clear enough. I've used JMO's Calendar tutorial in order to create a 'time-table' (DAYS), where each single day is a record in itself. Then I built on top of this: DAYS TABLES (of the restaurant) RESERVATIONS CLIENTS I created 2 layouts so far which are satisfactory: A monthly view (JMO's) with a layer added on top of it, showing the total number of guests reserved for any given day. So each day shows the date, and a large bold number which is the result of the calculation. A daily view, with a portal showing a list of reservations, sorted by table number and then by time. It works great, except it doesn't show the 'daily floor'. The layout I would like to add to these 2 views is one where we would show the FLOORPLAN, i.e. small portals or representations of each table for any given day. You can view a VB representation of what I am trying to recreate here: http://www.fmforums.com/attachments/uploads/1195859377-FloorPlan.jpg I wonder if portals are the right way to go about this, or if there is any other 'technique' I should consider. Thanks in advance and best regards, Marco
Fenton Posted December 4, 2007 Posted December 4, 2007 This is sort of a duplicate thread; the other was adding on to the earlier thread (yesterday). Since Søren has replied to this one, we (you or I) should go delete the duplicate post on the other thread, before someone else answers there also. I answered on the other one, but didn't really specify how to do the tables. You likely still need a "Tables" table (the classic case of "namespace" conflict -), so that you can assign waitresses, etc.. But what you really need are 32 calculation fields, each a simple number (or whatever ID you are using for each table in your Reservations table. Example: _c1 = 1 _c2 = 2 There are a couple possibilities where to put these fields, which I'll go into a minute. Each would have a relationship to the Reservations table, based on two things: Table identifier (1, 2, 3, ...) Date Date in this case could be either a global field, so you could change it to view whatever date you wanted to. Or it could be a real date field, in a Dates table, with one row for every date. The advantage of that would be if you wanted to open 2 windows, and see 2 floor plans at once, for different days, by going to a different day in the Dates table (you'd have to create the date if it didn't yet exist). That seems pretty esoteric however, as you could just flip the global date to change dates. The global date field could be set by a Calendar, or by typing, and should have "+", "-", "T" (today) buttons. As I said, the _c1, _c2 fields, and the global date, could be in just about any table, looking at Reservations. But there would be an advantage to putting them in the Tables table. Which is that you could show other info about the table, such as the waitress assigned to the table (if that matters).* *If you preassign waitresses to specific tables on different dates ahead of time, then you'd need a TableDates table. But that's likely overkill. If you don't even assign waitresses, and in fact have nothing more to say about each table, then you don't really need the Tables table at all, and could put the _c1, _c2 fields and global date field in any table, and run the 32 relationships from there. Though you might was well have the Tables table, just to make it less messy. I hope this makes some sense. I can see it in my mind, but it doesn't go as easily into words.
Søren Dyhr Posted December 4, 2007 Posted December 4, 2007 But what you really need are 32 calculation fields Certainly not! You need 32 sandwiched records with a single calculation, based on one or several global fields... take a look here: http://www.fmforums.com/forum/showpost.php?post/205259/ Why? Because the 32 portals are very very slow rendering, I do honestly mean that the display of booking is very different to actually making them, although a calendar near metaphor could be tempting should it instead be done via a free-store approach like this: http://www.nightwing.com.au/FileMaker/demos7/demo705.html However when dealing with the visalization how would I then show empty timeslots? I would make it via a variation over the principle I show here: http://www.fmforums.com/forum/attachment.php?attid/7281/ ...Now to make the scrolling posible should the repeater be typecasted into a calculated field returning text. --sd
Recommended Posts
This topic is 6199 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 accountSign in
Already have an account? Sign in here.
Sign In Now