Summary

The RestScheduleImportToReference creates SpecialEvents in a schedule by reading from an API. It will create only the current or future events in the schedule.
This component is very similar to the RestScheduleImportExt, but you can select to import your special events to any schedule in the station (and not only the parent schedule).
Another difference is how existing special events are treated on an import:

  • existing special events which do not come from this component are ignored.
  • existing special events previously imported by this component which don't exist anymore on the server will be deleted.
  • existing special events previously imported by this component which still exist will be overridden.


Implementation

  • Drag and drop a RestScheduleImportToReference from the palette 
  • Configure its properties


 Properties

  • HttpConfig : To configure the Http (Get) request to get data about SpecialEvents. See Http Config
  • ScheduleId: If used with the discover of RestScheduleDeviceExt, will contain the id to identify the schedule. Will be empty otherwise
  • EventSelector: To select the part of the json that represents an event. It can be an array or an object. This is a JSON Key Selector based on the Http response
  • EventNameSelector: To select the name of the event to create. It should be a String. This is a JSON Key Selector based on the json part selected by the EventSelector
  • StartDateSelector: To select the start date of the event. It should be a String encoded. The encoding format has to be precised in DateFormat. This is a JSON Key Selector based on the json part selected by the EventSelector
  • EndDateSelector: To select the end date of the event. Works the same way than StartDateSelector.
  • DateFormat: To define the encoding used for start and end dates. Will be used to convert them in AbsTimes.
  • DateTimeZone: To define the timezone given by the API (usually UTC)
  • TagsSelector: To define which tags to create for each booking based on the returned JSON. It's useful when we want to display the attendees for example.
  • ScheduleOrd: The schedule in which the special events will be imported


Actions

  • Execute: To execute the import of SpecialEvents.


Since the 51.0.2, it is possible to import events which date and time are in separate values in the json.
To do so, put the date selector, a semicolon and the time selector in the start and endDate selectors. 
The component will solve the selectors and the semicolon will be replaced by a space.
Your date format will need to match the result of the resolved selectors.

example:
If you have a Json with the following content
{
  "startDate": "2023-07-17",
  "endDate": "2023-07-17",
  "startTime": "08:00",
  "endTime": "16:00",
   ...
}

to import it you will need the following configuration:
startDateSelector=startDate;startTime
endDateSelector=endDate;endTime
dateFormat=yyyy-MM-dd HH:mm