Using Locations steps for Holiday dates in Flow
  • 08 Jul 2022
  • 2 Minutes to read
  • Dark
    Light
  This documentation version is deprecated, please click here for the latest version.

Using Locations steps for Holiday dates in Flow

  • Dark
    Light

Article summary

Overview

Location steps are used to calculate date/time for only Business days. This tutorial discusses how to use location steps with holiday dates that are configured for the Location entity. Users may use these steps for processes (i.e., calculates dates for meetings, appointments, Due dates, etc.) that require calculating dates for only Business days. This example will discuss two location steps that will use holiday dates in their calculation from the Location entity.

Prerequisite
Before using the Location steps, users must configure the Location entity that will be used for the steps discussed in this tutorial.  Locations can be found under System>System Data>Locations. For information on configuring these settings, please go to Configuring Locations.
Note
The following link provides another example of using Location steps and more in-depth information on the two steps used in this tutorial: Using Location Steps in Flows.

Configuring Location Entity

For location steps to include holiday dates, the user needs to have the location entity configured with the holiday dates. This example uses the location steps to exclude weekends and holiday dates. The Location Entity, "Jane Doe Show Company," is configured as follows:


Compute Business Time For Location Step Example

This Step calculates a business date. It will exclude any non-working days and holidays configured for the Location entity.

Navigate to a Designer Folder and create a Flow. Under the step tab, search "compute Business Time for location." Drag and drop the Step to the workspace.


Configuration

Select the Step and navigate to the properties tab to configure the inputs.

InputExample input
StartIn this example, the start time is set to a constant date of "12/14/2020".
Days, Hours, MinutesIn this example, the Flow will calculate the 15 days from the start date. The output calculation will exclude weekends and Holidays.
Location NameIn this example, the location Name is "Jane Doe Shoe Company."


This Flow should calculate a date 15 days after the start date that excludes weekends and holidays. The holidays that will be excluded are "Christmas Eve," "Christmas Day," and "New Years."

Testing

Click Debug on the top of the Flow Designer and debug the Flow. The start date was "12/14/2020". 15 business days from the start date is "01/07/2021". This Flow excluded three weekends(total of 6 days) and three holiday days that fall during that time interval. So a total of 9 days are excluded.


Get Business Days Between Dates For Location Step Example

This Step calculates a number that indicates the number of business dates between the Start Date and End Date. This calculation is based on the "working Day" and any Holidays that are configured for the selected Location Name (this will exclude any non-working days and holidays)

Navigate to a Designer Folder and Create a Flow. Under the step tab, search "Get Business Days Between Dates For Location." Drag and drop the Step to the workspace.

Configuration

Select the Step and navigate to the properties tab. Here various inputs are required.

Input FieldInput Value, for example
EndThe end date configured for this example is "1/04/2021".
Location NameIn this example, the location Name is "Jane Doe Shoe Company."
StartThe start date configured for this example is "11/20/2020".

 


Testing

Click Debug on the top of the Flow Designer and debug the Flow. The View Input/Output dialog shows the Location Name is "Jane Doe Shoe Company." The Start date is "11/20/2020," and the End date is "01/04/2021," making the output 27 business days. This calculation excludes weekends and holidays that are configured.

The total days between the two given dates are 45 days. There are a total of 7 weekends that fall under that period (a total of 14 days) and four holidays. This gives a total of 18 days that should be subtracted from the total days, which will provide the output 27 business days between the given interval.




Was this article helpful?