The xSchedule BlackBox is used to display an interactive calendar, pulling in items from FileMaker data - and writing back when applicable.. It utilises the dhtmlxScheduler library.
It has a Month, Week and Day view. The following interactions are included:
Creating an appointment record by double clicking onto empty area
Modifying an appointment record(including deletion) by double clicking onto any appointment, it opens a dialog where you can change the description, and start/end timestamps(seescreenshotbelow)
Switching between Day/Week/Month views, and moving forward/back in time
A unique identifier used for each appointment record
Eg,"bb_data_schedules::id"
startdate_field
A field indicating the start date/time of an appointment record, can be a Date or Timestamp field
Eg,"bb_data_schedules::tstamp_start"
enddate_field
A field indicating the end date/time of an appointment record, can be a Date or Timestamp field
Eg,"bb_data_schedules::tstamp_end"
description_field
A field with some text content that will appear as the label for the appointment
Eg,"bb_data_schedules::description"
sort_field
A field with a number that represents its order when appointments take place at the same time
Eg,"bb_data_schedules::sort"
colour_field
A field that determines the colour an appointment is given on the calendar, contents can be text(eg,Blue) or a hex-code(eg,#ff0000)
Eg,"bb_data_schedules::bar_color"
chart_start_date
A FileMaker date that tells the calendar where to start
Eg, Get ( CurrentDate )
chart_options_js
Text content with javaScript that applies additional settings to the calendar(optional)
Eg,"scheduler.config.readonly = true;"
Example
xSchedule (
"bb_data_schedules::id" ;
"bb_data_schedules::tstamp_start" ;
"bb_data_schedules::tstamp_end" ;
"bb_data_schedules::description" ;
"bb_data_schedules::sort" ;
"bb_data_schedules::bar_color" ;
GetAsDate ( Min ( bb_data_schedules::tstamp_start ) ) ;
"scheduler.config.readonly = false;"
)
The chart_options_js parameter can be used to apply additional settings to the calendar. In our example above we are setting the chart to be read-only. The full set of chart properties is available here:
The appointment records included in the calendar will be constrained by the relationship to the table occurrence of your parameter fields. Multi-line keys can be used, but only on the left-hand side of the relationship. In other words, you can use multi-line keys only if they’re on the table that your current context is based on.
Reactor can poll for any new, deleted or updated records - and those changes will be reflected on the calendar in real-time. To do so, your appointment table must have a a zModID field, with an auto-enter set to the modification timestamp.
xSchedule ( id_field ; startdate_field ; enddate_field ; description_field ; sort_field ; colour_field ; chart_start_date { ; chart_options_js } )
xSchedule (
"bb_data_schedules::id" ;
"bb_data_schedules::tstamp_start" ;
"bb_data_schedules::tstamp_end" ;
"bb_data_schedules::description" ;
"bb_data_schedules::sort" ;
"bb_data_schedules::bar_color" ;
GetAsDate ( Min ( bb_data_schedules::tstamp_start ) ) ;
"scheduler.config.readonly = false;"
)
"scheduler.config.drag_lightbox = false; scheduler.config.full_day = true;"