I have a database where I manage the personal time off (PTO) for a large team. Each record has the employee's Name, Start Date, and End Date (as well as manager's approval, notes, etc). These PTO requests can rage from a single day (where start and end date would be the same) to multiple weeks. I need to produce a report for our payroll department of all of the records that fall within a certain pre-defined pay period which runs Sunday - Saturday for each week. I am also looking for a way to automate this or make it error proof.
A filter can easily be created to capture the records that apply to a given pay period:
- Start Date, is on or before, the last day of the pay period
- ~AND~
- End Date, is on or after, the first day of the pay period
This will find any entry that has one or more days within the pay period.
The brute force way to do this would be to manually update the filter definition each week, export a CSV, and send it along - but I am hoping there is a smarter way.
I was hoping that I could define an automation that would run each week at midnight, Sunday morning, create a CSV and email that to payroll - but I cannot find a way for the generation of a CSV to be automated.
Next, I tried to build an Interface / Shared View that payroll could use, but would require the user not to make a mistake in defining the filter each week to get the correct report, and I think it would be easy to mess that up. What I would love to have in this case would be a drop-down list with all of the filters for the pay periods pre-defined.
I found this post on the forum with a clever idea on how to solve something similar if the number of filters is relatively small - but having 52 buttons (one for each week of the year) would be really kludgy.
Hoping someone out there has another good idea I could use to solve this. Thanks!