Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The DayCal2 function gives you access to a rich Drag-n-drop calendar, and allows a huge variety of customizations to get the calendar working in your database, just how you want it.

...

Info

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

Parameters

Parameter Name

Decsription

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.
Alernatively, you could use the same Timestamp field in both "dateFieldName" and "startTimeFieldName"

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. As an alternative to duration, you can use the 'EndDateFieldName' override to set an end timestamp field. This makes the calendar search for records much quicker and is recommended where possible, especially for databases with larger record sets. In this case, you can simply leave durationFieldName blank.

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.

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

actionOnApptEnter
(opt)

The name of the script or a command to run on entry into an appointment. See Action Parameters below.

11

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.

...