Using Locations steps for Holiday dates in Flow
  • 03 Mar 2021
  • 2 Minutes to read
  • Dark
    Light

Using Locations steps for Holiday dates in Flow

  • Dark
    Light

Article Summary

Overview

Location steps are used to calculate DateTime for only Business days. Users may use these steps for processes such as calculating dates for meetings, appointments, due dates, etc, that require calculating dates for only Business days.

The following tutorial discusses two Location steps that use Holiday Dates in their calculation from the Location entity.
Prerequisite
Before using 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. Further information see: Configuring Locations.
Note
The following link provides an additional example for 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.

  1. Configure a Location with Type of Address set to Office, and Work Days selected as Monday-Friday.
  2. Create three Holidays for the Location; "Christmas", "Christmas Eve", and "New Years" respectively, 



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.

To use a Compute Business Time step:
  1. Navigate to a Designer Project, select CREAT FLOW; select Flow, provide a Name, then click CREATE.
  2. From the Toolbox tab, navigate to the DATA > DATES category and attach a Compute Business Time For Location step to the Start and End steps.
  3. Select the Compute Business Step to navigate to its Properties. Define the step's Properties.
  4. The Flow will calculate a date 15 Days after the Start date excluding Weekends and Holidays. The excluded Holidays are "Christmas Eve", "Christmas Day", and "New Years." 
    1. Under INPUTS, set a Constant Date for Start (for this example 12/14/2021). 
    2. Constant map 15 to Days
    3. Constant map the name of the Location to Location Name

  5. Save the Flow, then click Debug on the top action bar. 

    1. Select START DEBUGGING. 

  6. After the Flow runs, select the Compute Business Time For Location step, Execution 1, then View Input/Output Data.

    The step should Output the date Jan 6th 2022; this date reflects a Business Date that occurs 15 Days after the Start Date while paying attention to avoid Holiday Dates and Weekends in the calculation. 



Get Business Days Between Dates For Location Step Example

This step calculates the number of Business Days between the Start Date and End Date. This calculation is based on the Work Days that are configured for the selected Location Name (this will exclude any non-working days and Holidays).

To use the Get Business Days Between Dates For Location step: 
  1. From a new Flow, navigate to Toolbox > DATA > DATES and attach a Get Business Days Between Dates For Location step to the Start and End steps.
  2. Select the newly added step to configure its Properties.
    1. Set End to the Constant Date "1/4/2022." 
    2. Set Location Name to the name of the configured Location. 
    3. Constant map Start to "11/20/2021." 
  3. Save the Flow, then click Debug on the top action bar. 
    1. Click START DEBUGGING.
  4. After the Flow runs, select the Get Business Days Between Dates For Location step, then select Execution and View Input/Output Data
    The Output number of Business Days should be 29 to reflect the number of Business Days between 11/20/2021 and 01/04/2022, with the exclusion of Weekends and any configured Holidays. 


Was this article helpful?