The calendar
view field edit type provides an interactive calendar to display
an object collection property, with each object treated as a calendar
event. Properties of the object type used should represent an event
title, an event start date and time and an event end date and time.
Definable behaviors include allowing users to change viewing options,
setting start and end times for a work day, and days included in
a work week.
As
a part of the calendar view field edit type, actions may be defined
for double-clicking a calendar event as well as for double-clicking
a calendar day and time that currently contains no events. When
defining this field edit type, it is likely the field will comprise
most, if not all of the viewable screen area.
The resulting
display will be a calendar control that may include events. A given
event is represented by an object instance containing the event’s
title, and its start and end date and times. The event will then be
represented in the calendar view as a block spanning the days and
times as provided by the start and end date and time values. Users
will be able to interact with these events and/or with empty time
periods on the calendar based on double-click actions that can be
set for the field.
Note that this field edit type was only
supported on the desktop builds of the Windows operating system supported
by the Agentry
Client in
versions of the Agentry Mobile Platform prior to 5.1. Release version 5.1
and later of the Agentry Mobile Platform provide support for the
mobile Windows operating systems supported by the Agentry
Client.
Calendar View Data/Style Attributes
The
following attributes for a field with a calendar view edit type
define the collection property to use, and the properties within
each object instance contained in the object collection to use for
displaying events in the calendar view. They also include the styles
that may be applied to the calendar view events.
Calendar
Data- Collection: Sets the object collection property
that will be used as the data source for calendar events. Each object
instance in this collection will be treated as a calendar event
by the field.
- Event Title: This attribute specifies the value to display
as the title of a given event. This may be either an object property
within the objects of the collection, or the return value of a rule.
If set to a rule, the rule is evaluated in the context of the object
instance for the event and is expected to return a string value.
This rule will be evaluated once for each object currently displayed
in the calendar view. Changing the view options of the calendar
on the Agentry
Client at
run time will result in the rule being evaluated again for each
object displayed.
- Event Start: This attribute specifies the value to treat
as the start date and time for an event. This may be either an object
property within the objects of the collection, or the return value
of a rule. If set to a rule, the rule is evaluated in the context
of the object instance for the event and is expected to return an
integral number treated as an Agentry date and time value. This
rule will be evaluated once for each object currently displayed
in the calendar view. Changing the view options of the calendar
on the Agentry
Client at
run time will result in the rule being evaluated again for each
object displayed.
- Event End: This attribute specifies the value to treat
as the end date and time for an event. This may be either an object
property within the objects of the collection, or the return value
of a rule. If set to a rule, the rule is evaluated in the context
of the object instance for the event and is expected to return an
integral number treated as an Agentry date and time value. This
rule will be evaluated once for each object currently displayed
in the calendar view. Changing the view options of the calendar
on the Agentry
Client at
run time will result in the rule being evaluated again for each
object displayed.
- Include Rule: Sets the name of the rule that can be used
to limit the objects in the collection that will be displayed.
- Tool Tip Rule: Sets the rule that can be used to format
a tool tip text when a user hovers the cursor over an event displayed
in the calendar as an event.
Calendar Styles- Highlight
Events: This attribute provides the style to apply to events
that should be highlighted in the calendar view. This style should
be set based on a rule in any real-world use cases. The rule is
evaluated in the context of the object instance representing the
event and is expected to return a string value containing the name
of the style to apply to those events that should be highlighted.
An empty string will use the default style.
- Selected Events: This attribute provides the style to
apply to a selected event in the calendar view. The style to be
applied may be selected from those that are defined, or the name
of the style can be returned from a rule. If a rule is used, it
will be evaluated in the context of the object instance representing
the event when the user selects the event. The rule is expected
to return a string value containing the name of the style to apply.
Calendar View Options Attributes
The calendar
view options attributes define behaviors related to the options
a user may set, including whether or not to allow the user to set
those options. These include the different views the calendar supports,
the days of the week to treat as work week days vs. weekends, and
whether or not those weekend days should be compressed in the month
view.
Calendar Options- Allow User to modify
Options: This attribute controls whether or not users can
change the calendar options on the Agentry
Client.
If set to true, the remaining attributes set here are treated as
the defaults for the calendar behavior, which the users can then
override. If this attribute is set to false, the options set here
will define the behaviors exhibited at all times for each view supported by
the calendar.
- View: Sets the default view for the Calendar:
- Day: Displays
the current day
- Month: Displays the entire month, including weekends.
- Week: Displays the entire week, Sunday through Saturday,
including both work and not work days.
- Work week: Displays the current work week. The days in
the work week are defined in the Work Week section.
Day
View - These attributes affect the appearance and behavior of
the calendar view when set to the Day View on the
Agentry
Client.
- Time Scale: Sets the time scale, in minutes, for the
time rows in the calendar. Options for Time scale are in minutes,
can be in increments of:60, 30, 15, 10, 6, or 5.
- Start Time: Sets the calendar start time in increments
of 30 minutes. The calendar uses a white background color when displaying
times between the start time and end time.
- End Time: Sets the calendar end time in increments of
30 minutes. The calendar uses a white background color when displaying
times between the start time and end time.
Work Week
View - These attributes affect the appearance and behavior of
the calendar view when set to the Week or Work Week view on the
Agentry
Client.
- Sunday - Saturday check boxes: Sets which days of the
week are included in a Work Week. Unchecked days are treated as
weekends.
- First Day of Week: Sets the first day of the week displayed
on the calendar as the left-most day.
Month View -
This attribute affects the calendar only when the field is set to
the month view.
Compress weekends: Check to compress
Saturday and Sunday in the calendar month view. Unchecked, and Saturday
and Sunday will display like the other days in the week.
Calendar View Actions Attributes
The attributes
for actions in a calendar view allow for the definition of actions
to be executed when the users double-click an event in the calendar,
and when double-clicking an open time slot within the calendar.
- Double-Click on Event Action and Target: These attributes
allow for the definition of an action to be executed when a user
double-clicks an event in the calendar, and the target object of that
action. This target is normally the object representing the event
just selected. In most use cases the action may display that event
and/or allow the user to edit that event.
- Double-Click off Event Action and Target: These attributes
allow for the definition of an action to be executed when a user
double-clicks a time slot within the calendar that does not currently
contain an event. This target is normally the parent object of the
collection being displayed by the calendar view field. In most use
cases the action will allow the user to add a new event starting
at the day and time slot double-clicked in the calendar. The selected
begin or end date may be retrieved via the rule function SCREENFIELDVALUE by
passing the name of the calendar view field and either of the parameters SelectedBeginDate or SelectedEndDate.