Forum Discussion

Lee_SGilmore's avatar
Lee_SGilmore
Qrew Cadet
7 years ago

Formula Checkbox to Turn On at 11:00am on Monday

I'm currently building in some time sheet data protections and I wanted to turn off the ability to edit a time sheet record anytime after Monday at 11am.

Users submit time each week, due end of day Friday. The grace period is available until 11am the following Monday morning. After that, I'd like the record to be view only and require the user to contact the payroll department if they need to make any changes.

My sketch for a Check Box formula field went something like this:
If(Now) > TimeofDay(FirstDayOfWeek([Date])+Days(1) + Hours(11))

I understand this formula is riddled with issues but it's sketching out my thought process. Any way to achieve this? I can build in permissions that make the record view only once I have the field functioning.
  • Lee,
    Could something like this work?
    You could create a formula checkbox called IsEditable, and then create a custom rule for editing where this checkbox must be checked.

    If(
        [Time Card Date] <= Today(),
            If(
                Now() > ToTimestamp(FirstDayOfWeek([Time Card Date]) + Days(8), ToTimeOfDay("11:00")), false,
                true
            ),
        true
    )


    "FirstDayOfWeek([Time Card Date]) + Days(8)" should return the Monday that follows every "time card"
  • Good morning Justin,

    This worked perfectly! I'm now establishing the custom rule requiring the checkbox to be checked in order to edit the record. Thank you very much for your help!