Schedulers
Introduction to Schedulers​
Universal GUIA Scheduler can be used to visualize appointments or tasks on a timeline. For more information about the features in the Scheduler, see Scheduler in the Universal user interface guide.
For the Windows GUI, a Scheduler can only be created with an object model extender.
An example of a Scheduler in an application
Add a Scheduler to your application​
Prerequisites for adding a Scheduler​
Universal GUITo add a Scheduler to your application, a table or variant needs a screen type with a Scheduler component. See Scheduler component.
Set up a Scheduler​
Universal GUITo set up a Scheduler for a table or variant:
menu User interface > Schedulers > tab Tables
-
Select the table or variant to which you want to add a Scheduler.
-
Optional. If you already configured one or more Scheduler views, you can select one in the field Default view. For more information, see Add Scheduler views.
-
Specify Resource grouping to determine how the resources are grouped in the Scheduler. Select one of the following options:
- Single column - uses one resource grouping column. Define the column:
- Group by column - select the column that should be used to represent the resource on the Scheduler. Rows with the same value in the Group by column will be grouped together in the same resource row in the Scheduler.
- Hierarchy - allows resources to be grouped hierarchically in a tree, with resources underneath other resources.
Use this, for example, to show an organizational hierarchy with employees and their managers.
- Group by column - select the column that should be used to represent the resource on the Scheduler. Rows with the same value in the Group by column will be grouped together in the same resource row in the Scheduler.
- Parent group by column - select the parent column.
- Default expanded - determines if the hierarchy is expanded by default. You can set the level to which the tree should expand by entering a value in the field Level.
- Single column - uses one resource grouping column. Define the column:
-
Specify the Activity linked columns:
- Title column - Optional. Contains the title for the activity.
- Tooltip column - Optional. Contains the tooltip for the activity.
- Start date column - contains the start date for the activity.
- End date column - contains the end date for the activity.
- The activity color can be set with a conditional layout in the Activity title column.
- You can add resources that do not yet have an activity by including a row in the subject with an empty start- and end date.
-
Optional. Select a task in the field Add activity task. For more information, see Set up task execution on a time cell.
-
Optional. Specify the Drag-drop permissions:
-
Allow date dragging - Allows the activity to be dragged to another date for the same resource.
-
Allow resource dragging - Allows the activity to be dragged to another resource for the same date.
noteIf the subject is a view, this could require an instead-of update trigger. Dragging an activity to another resource will update the Group Until column to the target value. Since the translation of lookups is not yet supported, you may have to translate this back to a correct foreign key value using an instead-of update trigger.
-
A Scheduler starts in the current month.
Set up a scheduler for a table or variant
Set up task execution on a time cell​
You can set up tasks that can be executed by users when they click or touch a time cell in the Scheduler. They can use these tasks, for example, to easily add an appointment or to block time for machine maintenance. If configured, the task receives the start time of the selected time cell as a parameter.
To set up task execution in a time cell:
menu User Interface > Scheduler > tab Scheduler > group Linked task
-
In the field Add activity task, select the task that should be executed when a user clicks or touches a time cell.
-
To pass the start date and time of the selected time cell to the table task parameter, select the Start date time parameter. For more information, see:
Add a conditional layout to a Scheduler resource​
Universal GUIYou can add a conditional layout to a Scheduler resource. You can use this, for example, to highlight resources that are not available, or to give parent nodes a different color than their children in a hierarchy.
To add a conditional layout to a Scheduler resource:
menu User Interface > Subjects > tab Data > tab Conditional layout
-
Follow the steps to add a conditional layout, as described in Add a conditional layout.
-
Select the checkbox Show conditional layout.
-
Select the checkbox Apply to Scheduler resource.
noteThe field Column does not apply to the Scheduler. If the conditions are met, the appropriate scheduler resources will receive the conditional layout. When evaluating these conditions, only the first record of a source is tested.
Add Scheduler views and timescales​
Universal GUIThe Scheduler views determine how the Scheduler is displayed in your application. It is possible to add multiple timescales.
menu User Interface > Schedulers > tab Tables > tab Scheduler views
-
Enter a Sequence no. If no default is selected, the first Scheduler view according to its Sequence no will be shown as the default instead. The other available Scheduler views can be selected by the user in your application.
-
Clear the Show scheduler view box if this Scheduler view should not be available for this table or variant.
-
Configure the settings for the Scheduler view:
- Sliding pagination - The UI uses the top timescale to determine the pagination.
If sliding pagination is disabled, the view will cover the entire period of the highest timescale (for example, a complete calendar year from January to December).
If sliding pagination is enabled, a sliding window will focus on the current date and time (for example, from this summer to the next summer).
Note that when sliding pagination is enabled and the top timescale is set to 'Year', the Scheduler view starts a month in the past. This ensures that you do not overlook events that started earlier. - Labels for lowest timescale: Determines whether the lowest timescales will be labeled. If selected, the cells of the timeline will be split according to the lowest timescale interval. This allows for a more fine-grained display of the timeline and more precision when dragging and dropping activities. For example, every hour interval could be split into 30-minute intervals. If deselected, instead of every 30-minute segment, only the hours will be labeled and each hour will contain two segments denoting the 30-minute intervals.
- Sliding pagination - The UI uses the top timescale to determine the pagination.
If sliding pagination is disabled, the view will cover the entire period of the highest timescale (for example, a complete calendar year from January to December).
If sliding pagination is enabled, a sliding window will focus on the current date and time (for example, from this summer to the next summer).
-
Configure one or more timescales. You can select an existing Scheduler as default in the Scheduler tab.
- The highest timescale will be used as the Scheduler's scale.
- The lowest timescale will be used for the Scheduler's cells.
- The lowest timescale and any other available timescales will become Scheduler headers.
- The highest two headers are combined when relevant to save space, for example, by placing the year after the month.
- Intervals higher than 1 will be denoted in a way that indicates the duration, e.g. "1 AM - 12 AM".
Timescale example
If you configure one year, one month, and one day as timescales:
- Your Scheduler will scale across a year.
- Each cell will be a single day.
- A header will show the day and month.
Scheduler views and timescales
Add conditional time cell formatting​
Universal GUIAfter adding a Scheduler view, you can set up conditional formatting for time cells in the Scheduler.
Examples of conditional time cell formatting
- To highlight important information: a cell in a regular column is orange when 'important = 1'.
- To differentiate between opening hours and closing times: cells in a time scale are gray when hours are not between 8 and 18.
- To combine an organization's opening hours with information about the availability of a machine: cells in a time scale are gray when hours are not between 8 and 18 and 'machine_has_regular_work_times = 1'.
To set up conditional formatting for a time cell in the Scheduler:
menu User Interface > Schedulers > tab Default > tab Scheduler views > tab Cell colors
-
Set the background color for the cell for light and dark mode.
The background color for the cell
-
Go to the tab Cell color conditions to set up the conditions for the cell color.
-
In the field Type of time scale, select whether to apply a condition to a Column or Time scale.
Available types of time scales
Two types of time scales are available, Column and Time scale:
- Column - When a regular column is used, it will be evaluated against the resource record.
- Column - Select the column you want to use in the condition.
- Condition - Select the condition for the column, for example, Contains.
- Type of value - Select the type of value, Constant or another Column.
- Value - Enter the value for the condition, for example, 'Available'.
- Time scale - When a time scale is used, it will be evaluated against the present time scales.
- Time scale - Select the time scale you want to use in the condition, for example Hour.
- Condition - Select the condition for the time scale, for example Greater than.
- Type of value - Select the type of value, for example, Constant.
- Value - Enter the value for the condition, for example, '8'.
noteIf you set up a condition on a time scale that is not included in the Scheduler, it will always be true. This could lead to unexpected or unintended styling or behavior.
For example: if the Scheduler is configured with a time scale of 'Year/Month/Day', the conditional layout for 'Hour' will always be true, leading to all time cells being colored. In this case, your condition must also relate at the very least to Months.
Conditions: the cell background color is gray if the hours are not between 8 and 18
- Column - When a regular column is used, it will be evaluated against the resource record.