MonthCal

Intro

MonthCal is part of the Calendar Pack, which comprises DayCal, ResourceCal and MonthCal. It allows appointments to be viewed as if on a calendar month page.


    MonthCal( displayMonth ; displayYear ; "dateFieldName" ; "startTimeFieldName" ; "durationFieldName" ; "descriptionFieldName" {; "colorFieldName"; "titleFieldName" ; "actionOnApptSelect" ; "actionOnDaySelect" } )


    Parameters


    1

    displayMonth

    The first month to show on the calendar. Can be a month number or the name of a field (on either the home or the related table) containing the month number, or a calculation producing a month number. If a field name is used, it is NOT enclosed in quotes.

    2


    displayYear

    The first year to show. Can be a number or the name of a field (on either the home or the related table) containing the year number, or a calculation producing a year number. If a field name is used, it is NOT enclosed in quotes.

    3


    dateFieldName

    The field on the related table containing the appointment date. Must be of type Date. The field name needs to be enclosed in quotes and be the full TO::FieldName form. Note that the field name parameters should not be calc fields if you want to be able to update records.

    4


    startTimeFieldName

    The field on the related table containing the Start Time of the appointment. Must be of type Time. The field name needs to be the full name and enclosed in quotes.

    5


    durationFieldName

    The field on the related table containing the Duration of the appointment. The field name needs to be the full name and enclosed in quotes.

    6


    descriptionFieldName

    The field on the appointment table containing the Description of the appointment. The field name needs to be the full name and enclosed in quotes. When the record is first created, the key appears in this field temporarily unless you divert it to a different field using the override CreationFieldName='TO::fieldname'.

    7


    colorFieldname

    (opt)

    The field on the related table containing the Color to be used for the appointment. The field name needs to be the full name and enclosed in quotes. Note that a hex or RGB() value is expected.

    8


    titleFieldName

    (opt)

    The field on the related table containing the Title to be used as the top line of the appointment. The field name needs to be the full name and enclosed in quotes.

    9


    actionOnApptSelect

    (opt)

    The name of the script or a command to run on selection of an appointment (useful for obtaining the record number of the record currently being edited). See note on Action Parameters below.

    10


    actionOnDaySelect

    (opt)

    The name of the script or a command to run on selection of a day. No script parameter should be used in this case: a script parameter, set to the date selected in format yyyy-mm-dd, is automatically generated. If a different date format is needed, use a script parameter of DateMask=. e.g. "Script=DaySelected|DateMask=d-m-Y". See note on Action Parameters below.


    What you need to know


    Action Parameters

    Each of the functions in the Calendar Pack have optional Action parameters, allowing you to run a script or set a field when a field is selected. See Action Parameters for details.

    Adding and Deleting Appointments

    Double-clicking in a day results in an appointment for 8 a.m. being created. Deleting or changing an appointment must be done from the record, not using the WebViewer.


    Example: The following shows a layout followed by what it produces in Browse mode.


    Picture 8.png
    Picture 6.png


    Customization

    With some knowledge of Javascript, you can make a number of customizations. See Customizing Calendar Functionality and Customizing Calendar Display.


    Miscellaneous Requirements

    The DayCal requires the use of the zMODid field, and uses the relationship between the 'home' table and the 'appointment' table. You should read the linked pages to understand the requirements for these.

    Refresh Issues

    Sometimes it can be difficult to get the Web Viewer calculation to and this can occasionally make it look as if something you have written is not working. For more information about resolving this issue, read here.

    Known Issues

    Multi-Line Keys: Calendars will not work with a multi-line-key child (i.e on the right side of a relationship).


    Table of Contents