Jump to content

Weekly calendar format


Mandu
 Share

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

Recommended Posts

I have a Meetings table with the days & times for various meetings:

Meetings

CourseCode // e.g. 209ALG

DayOfWeek // "Sun" - "Sat"

StartTime // e.g. 9:30 pm

Notes

For a class that meets 3x a week, there would be 3 records:

209ALG, Mon, 9:30 PM, Lecture

209ALG, Wed, 9:30 PM,

209ALG, Fri, 7:00 PM, Lab

I would like to display the schedule for a meeting in a calendar format, with 7 columns labeled "Sun" through "Sat" and rows containing cells with the start time and notes in the appropriate columns.

(I don't know how to force a monospace font, or I'd supply an example - hopefully you can imagine what I want it to look like :-)

I began with a temporary table, "Weekly", containing 7 fields (Sun, Mon, ...). Each field has two repetitions, for Start Time and Notes. I tried looping through the Meetings table, creating a record in Weekly, but couldn't figure out how to "address" a second table from within a loop through the first table.

What sort of approach would be recommended to create such a report? The weekly calendar layout need not be interactive, just read-only.

Thanks

Chap

Link to comment
Share on other sites

You need three tables for this: Calendar, Slots and Events.

Calendar has one record, and 7 fields (global or calculation), one for each DayName of week.

Slots has 2 fields - DayName and Time. You need to pre-generate a record for each possible slot. For example, to show 16 half-hour slots from 9:00 to 16:30, you need 7*16 = 112 records in the slots table.

Events is your Meetings table.

On the relationships graph, you need 7 table occurences of the Slots and Events tables each. The 7 TO's of Slots are linked to the Calendar table by DayName, each TO to a different day. The Events TO's are linked to the Slots TO's by DayName and Time.

On the Calendar layout, you place 7 portals - one to each TO of Slots. Place the fields you want to see from Events inside the portal.

Note that when Events conflict, only one will be displayed.

Link to comment
Share on other sites

Thanks, comment.

Your solution has the advantage of not requiring any scripting, and not using repeating fields (and other advantages, I'm sure :-)

Several things are problematic for me:

-- I want the calendar to only take up as much vertical space as necessary; for example:

SUN........MON........TUE........WED........THU........FRI........SAT.......|

|.............|9:30pm..|.............|9:30pm..|.............|7:05pm|...........|

|.............|Lecture...|.............|..............|.............|Lab......|...........|

(I shoulda posted an example, after all...)

-- There actually can be more than one meeting at the same time; e.g. a 5:00pm Men's meeting (upstairs) and a 5:00pm Women's meeting (downstairs).

-- Meetings do not necessarily begin on the hour or half-hour.

I didn't realize that the solution would be so complicated. At this point I can get reasonably close to what I need by creating a record in a Calendar table with 7 text fields, looping through a found set of Meetings and concatenating StartTime and Notes into the appropriate text field (Sun..Sat), and showing the record on a layout that displays the 7 text fields as columns laid out left to right. Far from ideal, but it may be enough.

Link to comment
Share on other sites

This topic is 5656 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
 Share

×
×
  • Create New...

Important Information

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