Calendar control
This guide will take you through how to set up the calendar control.
The example provided is a calendar shared by a warehouse department.
Having a shared calendar for the department is beneficial for several reasons. It enhances coordination, ensuring everyone is aware of upcoming meetings, deadlines, and significant events. This visibility helps avoid scheduling conflicts and ensures that all team members can participate in meetings and department-related activities.
Prerequisit data
No connectors will be used in this example, but data from table steps will be utilized. Please download the files below; they will be used to import into the required table steps.
Add a calendar control
Add a User step.
Add a Table step.
Open the Table step and select Import File.
Choose the semicolon separator and click OK.
Select the "calendarTasks.csv" file downloaded in the prerequisite section above.
Set the table variable name to "calendarTasks" and click OK.
Change the step name to "calendarTasks." It's good practice to name steps after their content.
Right-click on the "calendarTasks" step, select Add data arrow, and connect it to the User step created in step 2.
Repeat the process for two other files, "nonWorkingDates" and "shippingDates."
Open the User step and add a Calendar control.
In Prompt write "Team activities".
In Source, open the drop-down list and select the table "calendarTasks".
In Columns click EDIT.
Click Add All Columns to add all the columns from the data source.
The grey top row is where the calendar control gets the data. Open the Source drop-down and select Date.
Since Date is now included twice, remove the second row Date by clicking the minus icon in the top right corner.
Click OK to close the EDIT.
Click OK to close the User step.
Click the Play button in the top right-hand corner to run the application in diagnostic mode.
If you select a date with activities, the application will appear as follows:
Add style
In the calendar above, it is not possible to see which dates have activities or not. Visual feedback in a calendar is beneficial because it allows users to quickly determine whether there is an activity booked for a particular date, aiding in efficient planning and organization.
There are two styling options
Starring expression - This configuration will display an asterisk in color for all dates where the expression is true.
Underlining expression - This configuration will display a dot or line in color for all dates where the expression is true.
Starring Expression
Open the User step with the Calendar control.
Click on the Calendar control.
In Style - Starring Expression (at the bottom of the configuration) write {case when selectedDay in calendarTasks.Date then "RED" else "" end} . This will result in a red asterisk for all dates with activity.
Click OK and close the User step. Run the application again in diagnostic mode.
Underlining Expression
Open the User step with the Calendar control.
Click on the Calendar control.
In Style - Underlining Expression write{case when selectedDay in shippingDates.Date then "#40AA00" else "" end} . This will result in a green dot under all dates with a shipping date.
Click OK and close the User step. Run the application again in diagnostic mode.
Add configuration
It is also possible to set a start and end date for the calendar, along with additional user feedback, such as visually highlighting non-working days.
Open the User step and navigate to the Calendar control and Configuration.
In the Calendar Start field, input: {Now()-10} . This will set the Calendar to start 10 days before today.
In the Calendar End field, input: 2024-05-20. This will set the Calendar to end on May 20, 2024.
In the Unavailable Days field, input: {selectedDay in nonWorkingDates.blocked_dates} . This will mark dates in the nonWorkingDates file as unavailable.
Click OK and close the User step. Run the application again in diagnostic mode.
Last updated