Hello friends,
I am building an application that looks through a list (view/query) of employees, builds an array of objects (Employees), then spawns (window.open) a new datapage/window and shares the Employees object/array with the child window. The child window/datapage invokes another query into a time entry database and looks for all time entries for today.
My Employee object looks like this:
name = employee name
id = employee id #
phone = employee cell #
check = boolean / status of a time entry for today or not
In the child datapage/window, a report is created retrieving all time entries from today. With each record, I loop through the Employee array looking for a matching employee ID. If a match, I set the 'check' attribute for that employee to true; time entered for the day. This approach basically enables me to look for records in the time entry table that are not present (yuck).
At the conclusion of looping through each time entry record for today, in the 'Footer' of the datapage, I loop through the Employee array and for each entry where the check flag is false and send an SMS. I want this process to run every hour from 7:00 pm until 11:00 pm every evening Monday-Friday. This "nagging" application will message employees who have not entered their hours worked that day. (READ: Our staff is tired of nagging reminding employees to enter their time - imagine that!)
I think I have the Twilio SMS API on the verge of success (check back Monday), but my vexing problem is this: **** How do I initiate running the initial datapage which creates the Employee array which starts the cascade of events? ****
Or... am I full of mud with my approach and should throw it away for a more elegant solution? Any of you geniuses out there have an elegant answer to this? Zapier? Scheduled tasks in Caspio?
Help a guy out?
Thanks - Ron