APPLICATION DESIGN


Creating an embedded scheduler
The embedded scheduler allows you to design a form or subform that displays the schedules of users. For example, you can create a form for users to schedule department meetings. Embedding a scheduler on the form lets users check everyone's schedules before planning the meeting time. Also, within the embedded scheduler users can click on a person's name to open that person's calendar view (provided the user has been given access in the person's mail preferences). You can program the calendar to open in a separate frame, or in its own window. For an example of an embedded scheduler form, see the Group Calendar form in the Mail template.

There are four parts to using an embedded scheduler:


To create an embedded scheduler on a form or subform

You can embed one or more embedded schedulers on a form or subform.

1. Open or create a form or subform for the embedded scheduler.

2. Move the cursor where you want the embedded scheduler to appear.

3. Choose Create - Embedded Element - Scheduler.

Note The embedded scheduler does not display scheduling information while you are designing the form or subform.

To create fields for the embedded scheduler

The embedded scheduler needs three pieces of information before it can display anyone's schedule.


One way to collect this data is to create editable fields on the form and have users enter in those fields the information they want displayed. You can also use LotusScript or the Formula language to create the field items. For an example of collecting the data using an action button and Formula language, look at the GroupScheduler form in the Mail Template.

Once you have created the fields or other method for collecting the data, you must associate those fields with the Embedded Scheduler attributes, as described in the following section.

To program the embedded scheduler

Once you have created the fields for collecting the data, you must program the embedded scheduler so that it can retrieve the data from the fields. You can program the embedded scheduler using the following attributes.

To associate the fields with the attributes:

1. Select the attribute from Objects tab of the Info List and

2. Enter a field name in quotation marks in the Script area of the Programmer's Pane.
AttributeDescription
Required people itemsA formula that evaluates to a text list of one or more item names. At runtime, the scheduler displays the set of required people.

If you are writing a LotusScript formula to obtain the data for this attribute, the formula must evaluate to a text list of one or more field names.

Optional people itemsA formula that evaluates to a text list of one or more item names. At runtime, the scheduler displays the set of optional people.
Rooms itemsA formula that evaluates to a text list of one or more item names. At runtime, the scheduler displays the set of rooms.
Resources itemsA formula that evaluates to a text list of one or more item names. At runtime, the scheduler displays the set of resource rooms.
Interval start timeA formula that evaluates to an item name. At runtime, the time/date value contained in this item indicates the start date/time of the meeting.
Interval end timeA formula that evaluates to an item name. At runtime, the time/date value contained in this item indicates the end date/time of the meeting.
Grid Start time A formula that evaluates to an item name. If this attribute is not specified, the scheduler's busy time grid begins on the current time and date. If the event is specified, the time/date value contained in this item is examined.

If the time portion of the time/date value is set to ALLDAY, the busy time grid uses the specified date and the current time. If the date portion of the time/date value is set to ANYDAY, the busy time grid uses the current date and the specified time.

The value of this field should be a date and time. If the value is not a date and time, the current date and time of the user's system is the default. If the value is a date only, that date and the current time on the user's system are the default. If the value is a time only, that time and the current date on the user's system are the default.

When a user accesses the form, the scheduling information starts from the specified date. The user can change which week is displayed by clicking on the left and right arrow keys. Each day will begin at the specified time. The time is rounded down to the nearest hour.

Note that the schedules are displayed in terms of the user's local time zone -- for example, a Pacific time zone user free between 9 and 5 PST will appear free between 12 and 8 to an EST user.

Display hours per dayA formula that evaluates to an item name. At runtime, the number value contained in this item indicates the number of hours that the busy time grid displays for each day.

This attribute is examined to determine how many hours of each person's schedule to display. The value of this field should be an integer between 1 and 24, inclusive. A value less than 1 will be defaulted to 1 and a value greater than 24 will be defaulted to 12.

Schedule Detail itemsA formula that evaluates to a text list of one or more item names. When the scheduler retrieves scheduling data, detailed data is requested for these items.

Displaying a legend

You can create a reserved field on the form that contains the embedded scheduler to allow users to turn the legend off or on. The reserved field name is $GroupScheduleShowLegend. Valid values are 0 (to turn the legend off), and 1 (to display the legend).

To set properties for the embedded scheduler

1. Open the Embedded Scheduler Properties box.

2. At the Info tab, you can set any of the following properties for the embedded scheduler:


3. At the Colors tab of the Embedded Scheduler Properties box, you can customize various foreground and background colors.

4. At the Layout tab of the Embedded Scheduler Properties box, you can set the width and height properties for the embedded scheduler.