DayCal

Intro

DayCal is part of the Calendar Pack, which comprises DayCal, ResourceCal and MonthCal. It is an extended version of the CalLite function.


DayCal( displayStartDate ; displayNumDays ; "dateFieldName" ; "startTimeFieldName" ; "durationFieldName" ; "descriptionFieldName" {; "colorFieldName"; "titleFieldName" ; "actionOnApptSelect" ; "actionOnDaySelect" } )


Parameters

1 displayStartDate The first date to show on the calendar. Can be a date in quotes or the name of a field (on either the parent or the child table) containing the date, or a calculation producing a date. If a field name is used, it is NOT enclosed in quotes. If left blank, and displayNumDays is left at 0, the first date displayed will be today's date.
2 displayNumDays The number of days to show. The width of each day shown is fixed, so you will see as many days as will fit in the Web Viewer you’ve drawn. Can be a number or the name of a field (on either the parent or the child table) containing the number of days, or a calculation producing a number. If a field name is used, it is NOT enclosed in quotes.
3 dateFieldName

The field on the child (appointment) 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 appointment 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 appointment 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 appointment table containing the Color to be used for the appointment. The field name needs to be the full name and enclosed in quotes. Three formats are recognized: hex e.g. #00ffff (no spaces) or RGB() e.g. RGB(200,0,0) or common color names recognized by all browsers: see http://www.w3schools.com/html/html_colornames.asp

8 titleFieldName
(opt)

The field on the appointment 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 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. See 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.


Customization

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

See Relationship Structures for limitations on relationships you can use.

Miscellaneous Requirements

The DayCal requires the use of the zMODid field.
The Validation setting "Always" in FileMaker is the one to use if you wish Reactor to recognize validation: the message "Could not create Appointment" is displayed if validation fails.

Refresh Issues

Sometimes it can be difficult to get the Web Viewer calculation to refresh 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).

Note that you can scroll up and down the DayCal by clicking and dragging on the time panel on the left.