Creating an embedded scheduler

About this task

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:

  • Create an embedded scheduler on a form or subform (Create - Embedded Element - Scheduler).
  • Create the fields that collect the data needed to display the embedded scheduler.
  • Program the embedded scheduler to retrieve the data from the fields.
  • Set properties for the embedded scheduler.

To create an embedded scheduler on a form or subform

About this task

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

Procedure

  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.

Results

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

To create fields for the embedded scheduler

About this task

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

  • Whose schedule to display (individuals or group).
  • What week to start the schedule information from.
  • How many hours per day of schedule information to display.

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

About this task

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:

Procedure

  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.

    Attribute

    Description

    Required people items

    A 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 items

    A formula that evaluates to a text list of one or more item names. At runtime, the scheduler displays the set of optional people.

    Rooms items

    A formula that evaluates to a text list of one or more item names. At runtime, the scheduler displays the set of rooms.

    Resources items

    A 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 time

    A 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 time

    A 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 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 day

    A 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 items

    A 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

Procedure

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

Procedure

  1. Open the Embedded Scheduler Properties box.
  2. At the Info tab, you can set any of the following properties for the embedded scheduler:
    • Name -- Name of the scheduling element. This is the name used to obtain a LotusScript® object for this scheduler control.
    • Target frame -- Specify the frame in which to display the group members' calendar views and appointment documents.
    • Show interval indicator -- Indicates whether or not to display the appointment indicator (the appointment indicator is one you can drag).
    • Show color legend -- Checking this displays the busy time color legend.
    • Show twisties -- Checking this displays twistie icons for required and optional people, allowing the user to collapse and expand the required and optional list of people.
    • Show checkboxes -- Checking this displays checkboxes to the left of people's names in the scheduler, allowing them to be deselected by anyone viewing the scheduler.

    • Initialize from item values -- Checking this causes the scheduler control initially to determine which participants to display based on the values of the items previously specified (see the preceding attributes table ). You may want to uncheck this field for R5 backward compatibility with group calendars.
    • Refresh from item values -- Checking this causes the scheduler control to refresh data from the values of the items previously specified. When a DocRecalc event occurs and this attribute is checked, the scheduler control discards any participant data it has and generates a new list of participants from the values of the items on the form. It also updates the meeting start and end times as well as the hours to display and the display start time. Because problems may occur when the NotesUIScheduler object has been used to add or remove participants, you may want to disable this field if a call to AddAttendee or RemoveAttendee is made through the NotesUIScheduler object.
    • Allow filtering -- Checking this field turns on the filtering button that is displayed before the attendee names.
    • Top, Middle, and Bottom titles -- Lets you specify titles for the beginning, middle, and end of the embedded scheduler. You can click the formula symbol for each title and enter a formula that evaluates to a title.
  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.