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

  • 0
  • 1
  • Question
  • Updated 9 months ago
  • Answered
  • (Edited)
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.
Photo of Lee Gilmore

Lee Gilmore

  • 790 Points 500 badge 2x thumb
  • sure there is a better way

Posted 9 months ago

  • 0
  • 1
Photo of Justin Torrence

Justin Torrence

  • 130 Points 100 badge 2x thumb
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"
(Edited)
Photo of Lee Gilmore

Lee Gilmore

  • 790 Points 500 badge 2x thumb
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!