The generic properties are

  • Created: (DateTime) Is the date and time at which the object was created.
     (for example, this booking was created on [FormatDate(”D”, CurrentBooking.Created)])
  • LastUpdate: (DateTime) Is the date and time at which the object was updated.
     (e.g. This booking was last updated on [FormatDate(”D”, CurrentBooking.LastUpdated)])
  • ID: Is a positive integer indicating a unique ID for the object. This is mostly used in debugging or when in need of identifying one object from another.

The generic properties are found on all complex objects, such as

  • Booking (for example, this booking was first created on [FormatDate(”D”, CurrentBooking.Booking.Created)])
  • Bookingdetalje (For example, this booking was last modified on [FormatDate(”D”, CurrentBooking.LastUpdated)])
  • Klient (for example, this client found its way to the system on [FormatDate(”D”, client.Created)])
  • Other complex objects are Location, Resource, Order, Workgroup, Reseller, FoodService, Menu, Screen and Product.
  • DateRange represents a time interval and consists of two DateTime values, range.From and range.To.
     (eg. [var range = booking.Dates] This booking lasts from [FormatDate(”t”, range.From)] to [FormatDate(”t”, range.To)] ..)

The Booking Type

This is the overall Booking data type, which is generally an agreement with at least one appointment date aka. booking details.

  • IsPublic: Specifies whether an appointment can be displayed publicly.
     (eg. [Foreach (booking in BookingsToday)][if (booking.Booking.IsPublic=true)]The event [booking.Subject] at [FormatDate(”D”, booking.DateFrom)] is public.<br>[end if][End foreach]
  • DateFrom: (DateTime) Specifies the start time for the appointment.
     (eg. The agreement begins at [FormatDate(”t”, CurrentBooking.Booking.DateFrom)] at [CurrentBooking.Booking.ResourcesString].)
  • DateTo: (DateTime) Specifies a basic end time for the appointment.
     (eg. The event at [CurrentBooking.Booking.ClientName] ends on[FormatDate(”D”, CurrentBooking.Booking.DateTo)].)
  • WholeDay: (Bool) Specifies whether a booking is full-day based (Times are 0).
     (eg. [if (booking.Booking.WholeDay)]The event lasts all day[else]The event lasts from [FormatDate(”t”, CurrentBooking.Booking.DateFrom)] to [FormatDate(”t”, CurrentBooking.Booking.DateTo)].[end if].)
  • ColorIdx: (Integer) Specifies the generic color code of the booking.
  • ClientID: (Integer) Specifies the unique ID of the client to which the booking is associated.
     (eg. [var client = GetCustomer(CurrentBooking.Booking.ClientID)]The event takes place at [client.Name].)
  • ClientName: (String) Is a shorter version of the above – because while the Client object can be used for much more, in most cases just the name is needed.
     (eg. The event takes place at [CurrentBooking.Booking.ClientName].)
  • ResourceIDs: (Integer list) Is the collective list of calendar ID’s attached to the booking. This property is rarely used.
  • ResourcesString: (String) Returns the booking resources as a combined text string.
  • BaseDetail: Is the basic detail of the booking.
     (For example. CurrentBooking.Booking.BaseDetail is identical to CurrentBooking.)
  • BookingDetailsAvailables: (Bool) Determines whether the details in a booking is available to the logged in user. This is only used in enterprise solutions where, for example, a user is logged on to the screen with their RFID card. If this property returns false, an event should only appear as busy.
  • EffectiveTimeZone: Is the time zone that the booking itself follows. For example, a birthday or full-day booking made in a different time zone than the one the view otherwise follows.
  • HasChanges: Determine whether any changes have been made to a booking that should be saved.
     (eg. [If (CurrentBooking.HasChanges=true)]Changes has been made to this appointment.[end if].)

The Bookingdetail Type

This type contains the most commonly used properties in the templates and is returned, for example, by calling CurrentBooking or in lists such as BookingsToday

  • Booking: (Generic Booking) Gives access to the generic booking (Remember, A generic booking contains one or more booking details also referred to as booking events).
     (eg. The original booking is set to start at [FormatDate(”t”, CurrentBooking.Booking.DateFrom)] at [CurrentBooking.Booking.ResourcesString].)
  • DateFrom: (DateTime) Specifies the start time for the appointment.
     (eg. The agreement begins at [FormatDate(”t”, CurrentBooking.Booking.DateFrom)] at [CurrentBooking.Booking.ResourcesString].)
  • DateTo: (DateTime) Specifies a basic end time for the appointment.
     (eg. The event at [CurrentBooking.Booking.ClientName] ends on[FormatDate(”D”, CurrentBooking.Booking.DateTo)].)
  • WholeDay: (Bool) Specifies whether a booking is full-day based (Times are 0).
     (eg. [if (booking.Booking.WholeDay)]The event lasts all day[else]The event lasts from [FormatDate(”t”, CurrentBooking.Booking.DateFrom)] to [FormatDate(”t”, CurrentBooking.Booking.DateTo)].[end if].)
  • Dates: (Dates.From og Dates.To) Is identical to DateFrom og DateTo.
  • LogicalDates: (LogicalDates.From and LogicalDates.To) are the logical dates that the booking detail would follow regardless of changes. Individual events in a booking can change their time frames.
     (f.eks. Mødet kl. [FormatDate(”t”, CurrentBooking.Dates.From)] blev oprindeligt sat til at starte kl. [FormatDate(”t”, CurrentBooking.LogicalDates.From)].)
  • RepetitionNumber: (Integer) In a booking with recurring events, this indicates the recurrence number. A base booking detail always has RepetitionNumber = -1.
     (f.eks. [CurrentBooking.ClientName] har [CurrentBooking.RepetitionNumber + 1] års jubilæum idag.)
  • ColorIdx: (Integer) Specifies the generic color code of the booking.
  • ClientID: (Integer) Specifies the unique ID of the client to which the booking is associated.
     (eg. [var client = GetCustomer(CurrentBooking.Booking.ClientID)]The event takes place at [client.Name].)
  • ClientName: (String) Is a shorter version of the above – because while the Client object can be used for much more, in most cases just the name is needed.
     (eg. The event takes place at [CurrentBooking.Booking.ClientName].)
  • ResourceIDs: (Integer list) Is the collective list of calendar ID’s attached to the booking. This property is rarely used.
  • ResourcesString: (String) Returns the booking resources as a combined text string.
  • BaseDetail: Is the basic detail of the booking.
     (For example. CurrentBooking.Booking.BaseDetail is identical to CurrentBooking.)
  • BookingDetailsAvailables: (Bool) Determines whether the details in a booking is available to the logged in user. This is only used in enterprise solutions where, for example, a user is logged on to the screen with their RFID card. If this property returns false, an event should only appear as busy.
  • EffectiveTimeZone: (TimeZoneInfo) Is the time zone that the booking itself follows. For example, a birthday or full-day booking made in a different time zone than the one the view otherwise follows.
  • NeedsConfirmation: (Bool) returns true if the booking needs to be confirmed.
  • IsConfirmed: (Bool) returns true if the booking has been confirmed.
  • HasChanges: Determine whether any changes have been made to a booking that should be saved.
     (eg. [If (CurrentBooking.HasChanges=true)]Changes has been made to this appointment.[end if].)

 

 

FormatDate(”Formatkoder”, [Date]):

The FormatDate command formats a date and/or time, also with respect to local cultural deviations. All dates in the booking system are measured in UTC, i.e. a neutral time format that is independent of day light saving time and date lines. FormatDate itself takes into account the current display of day light saving time, wintertime, or time zones in relation to where the view is to be used.

Therefore, it is recommended to use standard codes for date formatting. Standard time and date formatting codes are (but not limited to):

  • D: Long date format  (eg. Format(”D”, UtcDate) = Monday, June 15, 2009)
  • d: Short date format (eg. 6/15/2009)
  • T: Long time format (eg. 21:01:59)
  • t: Short time format (eg. 21:01)

Source: https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings

In addition, there is also the possibility to specify the time format in the same way, as below:

FormatDate(“dd-MMM-yyyy HH:mm:ss”, UtcDate) gives 10-sept-2019 23:59:59