Block - Ensure Entry Submitted Every Week Day

Hi,
Today I would like to share with you how to create an automation block to check the new submitting entry is the next week day of the past submitted entry.

Problem
Staff must submit the timesheet every week day. Staff will fail to submit the timesheet if he/she did not submit the timesheet 1 week day before the new submission date.

Objective
To ensure the staff submit the timesheet every weekday.

Step

  1. Click ‘New Automation’ at the activity created for submission.

  2. Click the tab ‘Do before’.

  3. Create a variable to store the list of submitted timesheet of the staff who is submitting the current timesheet. As shown in figure below, the variable name is ‘Timesheet List Found’.

  4. Check if ‘Timesheet List Found’ (the variable created in Step 1) is not an empty list.

  5. If ‘Timesheet List Found’ is not an empty list, then create a variable to get the latest timesheet from ‘Timesheet List Found’.


  6. Next, check the day of week of the current submitting timesheet. If the day of week is Monday, the latest submitted timesheet should be the past Friday. If the date of the current timesheet is not the next week day of the latest timesheet, then check the date of the current submitting timesheet is before or after the latest submitted timesheet.

  7. i. If the date of the current submitting timesheet is after the latest submitted timesheet, then prompt an error message since the date is not the next day of the latest submitted timesheet.
    ii. If the date of the current submitting timesheet is before the latest submitted timesheet, then check is there any submitted timesheet has the same date as the current submitting timesheet. If the current submitting timesheet has the same date as the submitted timesheet, then prompt an error message to ask the staff changes the date of the current timesheet.

  8. Click ‘Save’ to save the automation.

Congratulation, you have created an automation block to check the new submitting entry is the next week day of the past submitted entry.

1 Like