How to: Change hours in schedule

Support, Questions and Suggestions for the FM7 Version of CC Calendar.
Posts: 36
Joined: Tue Mar 28, 2006 8:41 pm
Location: Pittsburgh
PostPosted: Tue Mar 28, 2006 8:46 pm
I just purchased the CC Calender Scheduling Edition. I am setting up a database that only needs two time periods. Morning and Evening. How can I change the database to only show 2 time periods instead of 15 min periods.

Thanks Patrick
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Wed Mar 29, 2006 6:35 am
phcranston wrote:I just purchased the CC Calender Scheduling Edition. I am setting up a database that only needs two time periods. Morning and Evening. How can I change the database to only show 2 time periods instead of 15 min periods.

Thanks Patrick


Hi Patrick,

You can change this around quite nicely by making some minor changes to the calendar.

If you want to continue using the Scheduling Tab, you'll need to keep intact the relationship between appointments and hours. This means that you need to keep the ApptTimeStart and ApptTimeEnd fields in the CCCalAppts (appointments) table, and you'll need to make sure they continue to contain times.

So, to begin with I'd add a new text field to hold your designation of Morning or Evening. Add this field to the "Mini Window Edit Appointment" layout. Then change the ApptTimeStart and ApptTimeEnd fields into auto enter calcs so that they contain the times represented by your "morning" and "evening" designations.

For instance, "morning" might mean a start time of 9am and an end time of 2pm. You can be very creative here:

If you want to see both morning and evening appointments at the same time on the scheduling tab, make "morning" result in times from 8am to 11:30am and "evening" from 11:45am to 1:30pm. This way you can remove the time labels from the left side of the scheduling tab, and replace them with just a couple of text objects indicating "morning" and "evening". (You'll want to make sure that the upper left px of these objects are outside the scheduling portals so that the objects don't repeat once per portal row.)

Once that is done, the only issue you'll have is that when you click into an empty row in the Scheduling Tab, the calendar will try and create a new appointment for you based on the "time" you clicked in. (Remember, those are still hour records, so if you click in what used to be 10am, the calendar will try and create 10 an appointment for you.)

The best way around this is as follows... Edit the script "Edit Appointment". Find the section beginning with the comment "Get the context in case we have to create a new record." In here you'll want to set a new global field (GlobText4 for instance) to "morning" or "evening" based on which appointment time the user clicked on: this time is already recorded for you in GlobText2.

Once you have this global field containing "morning" or "evening" you can set this value when you create the appointment. To do this, edit the "New Appointment" and find the section beginning with the comment "If creating this from one of the Schedule Views, enter the Resource (row) and Appointment Time." After the second SetField there where we set the time, add a new SetField to set your "morning" or "evening" to the value you stored in GlobText4 above.

That is nearly all you have to do aside from any cosmetic work on the layouts to remove the time fields and replace them with your "morning" or "evening" field.

There is a little dialog presented when you create an appointment from the scheduling tab that asks if you you want to create an appointment at a certain time. That dialog is set in the same section of the "Edit Appointment" script you were editing above. Just change the dialog to use "morning" or "evening" from GlobText4.

That should be it. Hope that helps.
John Sindelar
SeedCode
Posts: 36
Joined: Tue Mar 28, 2006 8:41 pm
Location: Pittsburgh
PostPosted: Wed Mar 29, 2006 8:42 am
Thanks for the detailed response. I will try this out and let you know how it goes.

Return to CC Calendar (FM7/8)

Who is online

Users browsing this forum: No registered users and 3 guests

(855) SEEDCODE
[email protected]
Follow us: