I am creating a PTO (paid time off) tracking application in which a PTO period (which can consist of several days) must also be accounted for by hours of PTO taken per day.
I have a parent table for PTO block (paid time off), consisting of a relationship to the employee, a Start Date, and an End Date. I have a child table for PTO days (individual days within the block), with each record consisting of a relationship to the PTO block, a Date (to capture each individual day), and a number of hours per day of PTO used.
I am looking for help with formulating a URL button on a parent record (on the Add Record form, prior to saving) to accomplish the following:
- Save the record while avoiding the pop-up "you must save record first" dialog (if this is possible)
- Create the appropriate number of child records for each day of the duration of the PTO block (End Date - Start Date + 1)
- Don't even get me started on why "End Date - Start Date + 1" isn't a valid formula to Quickbase. Dates are numbers too. MS Excel figured that out a long time ago.
- Pre-populate each child record with a date, representing each day within the block of PTO time
There is an "Add New PTO" button on the Employee Details form, which brings up a new window to enter the Start Date and End Date.
I'd like to also have the individual child record PTO days available on this new window in a Grid Edit embedded table so that it is easy for the supervisor to enter the number of hours of PTO associated with each day of the PTO block (it's not always the same number).
Is this possible? And if so, can someone point me in the right direction to figure out how to go about this?
Thanks!
------------------------------
Jason Bowen
------------------------------