Versions Compared

Key

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

ResourceCal is part of Calendar Pack 2 CalPack2.html , which comprises DayCal2 DayCal2.html , ResourceCal2, MonthCal2 and NavCal. It is an extended version of the DayCalendar function, allowing bookings to be made for specified resources. Resources need not be people: you can track rooms, vehicles or any other type of resource.

...

Your layout table occurrence should have a relationship to a table which holds the bookings records. This control automatically filters your relationship by date range, and resource ID's, and any manual filtering (by relationship, or using the WhereFilter override) on these values might have unexpected results.

...

Info

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

Parameters

Parameter Name

Description

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 home or the bookings 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 home or the bookings 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

resourceIDList

A return-delimited list of resources or a list of resources and IDs. See "Resource List" example below. Note that your list should contain only the resources which you want to be displayed, not the full list of resources.

4

"dateFieldName"

The field on the bookings table containing the booking 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.

5

"startTimeFieldName"

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

6

"durationFieldName"

The field on the bookings table containing the Duration of the booking. 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.

7

"resourceIDFieldname"

The field on the bookings table containing the ResourceID to be used for the booking. The field name needs to be the full name and enclosed in quotes.

8

"descriptionFieldName"
(opt)

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

9

"colorFieldname"
(opt)

The field on the bookings table containing the Color to be used for the booking. The field name needs to be the full name and enclosed in quotes. Note that a hex or RGB() value is expected. To associate a color with a resource rather than a booking, create a calculation field on the bookings table, set to the color on the related resource record. For help with colors, refer to the "The Basics: Helpful Information" page

10

"titleFieldName"
(opt)

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

11

actionOnApptSelect
(opt)

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

12

actionOnApptEnter
(opt)

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

13

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 Action Parameters below.

...