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. See: Set up resource grouping in a Scheduler.
-
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 resource grouping in a Scheduler​
Universal GUIYou can determine how resources are grouped in the Scheduler to visualize them in a way that makes sense for your application.
To set up resource grouping in a Scheduler:
menu User Interface > Schedulers > tab Tables
- Follow the steps to add a Scheduler.
- In the group Resource grouping, 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:
Example of Resource grouping
Resource grouping allows you to display resources in a tree structure. For instance, if you have workshops with various teams, you can group them accordingly. This way, users can first select a workshop, then a team, and view activities only for its members.
The table below demonstrates the data structure that creates a valid tree:
Resource | Parent |
---|---|
Warehouse 1 | |
Team 1 | Warehouse 1 |
Team 2 | Warehouse 1 |
Team member 1 | Team 1 |
Team member 2 | Team 1 |
Team member 3 | Team 2 |
To set up hierarchical grouping:
-
Add a
parent_resource
column to your Scheduler view. This column stores the name of the parent resource. Each parent must also exist as a resource; otherwise, the tree will render incorrectly. -
In the group Resource grouping, configure the following:
- Set the Grouping type to Hierarchy.
- In Group by column, select the column that contains the resource names.
- In Parent group by column select
parent_resource
.
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:
Set up external drag-and-drop on a time cell​
Universal GUIYou can set up external drag-and-drop on a time cell so that users can drag rows, such as from a grid, directly onto a time cell in the Scheduler. This can be useful, for example, to let users create activities for a resource and time.
Before you can set up external drag-and-drop on a time cell, you must first create a task with a drag-and-drop link. A drag-and-drop link starts a drag-and-drop task when a user drags an item onto a table or row. For more information, see Drag-drop.
To create a task with a drag-drop link:
-
Follow the steps to create a Drag-drop link.
noteEnsure that Drag-drop interaction is enabled for the task in the tab Drag-drop interaction.
To set up external drag and drop on a time cell:
menu User Interface > Schedulers > tab Scheduler > group Linked tasks
-
In the field Add activity task, select the same task that you created as a drag-drop task in the previous step.
The following parameters will be passed to the task:
- The chosen Start date time parameter will be completed with the start of the timeslot that the user dropped the row on.
- If additional drag-drop parameters are configured, the Add activity task will also be populated with those.
External drag and drop on a time cell in the Scheduler
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.