Page History
Tags | Interaction, Function |
Type of accelerator | Accelerator to speed up development |
How to get | |
Compatibility | Blueriq 16.0 and higher |
Description
This Blueriq function lets you calculate a date in the future that is a certain number of business days ("working days") away from a chosen given start date. A similar function exists in the expression language: Date and Time time functions#WORKINGDAYSBETWEEN. What we want to achieve with this new function is similar to Date and Time time functions#ADDPERIODTODATE, but now with working days instead of all days. A typical use case is that you want to give an answer to a customer within X working days after the application is received. You want to add X working days to the current date, but there is no such function available in the expression language. For calculating this, you want to take weekends into account as well as holdays.
...
View file | ||||
---|---|---|---|---|
|
holidays.
Input and output parameters
Parameter name | Direction | Valid | Meaning |
---|---|---|---|
StartDate | Input | Any date | The date you want to start counting from |
NumberOfWorkingDays | Input | A number >=0 and <=100 | The number of working days that you want to add to the StartDate |
EndDate | Output | - | The date that is X NumberOfWorkingDays in the future |
In case you want to retrieve the list of the vacation days externally, a second function is present which has one additional parameter for setting these.
Parameter name | Direction | Valid | Meaning |
---|---|---|---|
VacationDays | Input | MultiValue Date | The date you want to start counting from |
Limitations in use
This function iterates through each date in the future until it finds a date which is the correct number of working days distanced. This means that it takes longer to compute the further away the date is. As most use cases concern numbers <=20, this should not be a problem. We want to discourage the use above 100 days due to performance reasons.
Possibilities for customization or extensions
Expand | ||
---|---|---|
| ||
You can set which days in the week count as working days. Each workday is defined as static instance. For example: Monday and Saturday For the numbering of days, see: Date and |
...
Expand | ||
---|---|---|
| ||
You can also set which days count as holidays. For this the static instance DutchVacationDays can be edited (and/or renamed). It is no problem to add dates which are also on a non-working week day. By default, all vacation days of the second half of 2018, and of complete 2019 are added, and you extend this to the future as far as needed. |
Expand | ||
---|---|---|
| ||
You could theoretically extend this function to also take vacations of specific employees into account. You would then need to add a new parameter with a user ID, and then add an additional check to |
...
the |
...
flow. You would need to connect to a system which stores vacation days, and then add a similar check on a new condition node. |
...