I have a timesheet layout that I intend to have for each user with their own privilege settings etc.
-Every user has their own login/pw and they can only see the timesheet layout - no other section of our database. Furthermore they can only see the timesheets associated with their userID, nobody else.
-I have a field within the layout called "Lock". It is set to enter 1 into the field if it is not the same week as the pay period in question. On the security side, if there is a 1 in that field, the record will no longer be editable by the user. The function of this is great and just what I wanted... but the timeline is not:
** I haven't been able to figure out the right calculation for my needs. I want the 1 to be entered into the lock field 2 days after the end of the pay period. So if Timesheets::PayPeriodEnd is 12/12/18... I want the 1 to be entered into the field automatically if it is 12/14/18 or beyond. Can someone help me understand what my calculation for the Lock field should be?
Similarly, I am trying to set it up so each user is logged out of their timesheet after a certain period of inactivity. I understand I can set a "lock user out after X seconds" on the server side of things- but that means it would have to apply to all users and us office admin folks can't have that.
So I went to installOnTimer Script and it does in fact close the file after say, 120 seconds. That'd be great except it's unlikely any given user will have their entire timesheet figured out in 2 minutes. From my reading I see people suggest that there is a way to prolong the time, or reset it- but I can't understand how I would do that exactly.
**We need the file to close if the user stops interacting with the timesheet layout after a couple minutes.... without it closing on them if they are active... Seems like a tall order?