Forum Discussion

SarahSarah's avatar
SarahSarah
Qrew Cadet
6 years ago

I want to create a rule based on the time lapse of a modification in a logged text field

I have a logged text field called "Sales Notes" that needs to be updated every time the field "Status" changed. Specifically, I want to make it a requirement that the "Status" field cannot be changed unless the "Sales Notes" field has been modified within the previous hour. I couldn't figure out how to do this with a dynamic rule.

2 Replies

  • Hi Sarah. You want the user to be required first to update the sales notes, and then they have one hour to update the status? You can do it with a dynamic form rule, but there are several steps you'll need to do first:

    First:
    Create a Date/Time field called Sales Notes Changed Timestamp (or similar). This will hold the date/time when the user last changed the sales notes.

    Second:
    Create a Formula Numeric field called Time Elapsed (or whatever). This will tell you how many hours have elapsed since the sales notes changed. This is the formula:
    ToHours(Now() - [Timestamp Sales Notes Changed])
    Third:
    Create an automation that will write the value of Date Modified to the field Sales Notes Changed Timestamp whenever a user changes the Sales Notes field:





    Finally:
    Create a dynamic form rule that will make the Status field read-only if Time Elapsed > 1 (= one hour).



    Summary:
    When the user makes a change to the sales notes field, the automation updates the timestamp field with the current date/time the record is being modified. The time elapsed keeps track of how long it has been since the sales notes were updated, and the form rule prevents users from changing the status if it has been longer than an hour.

    You'll probably want to hide the timestamp field from forms or restrict users' ability to edit it. That way only the automation will be able to update it.

    I hope this helps. Feel free to contact me if you need anything else.

    Yours truly,


    PHILLIP DENNIS
    Principal | Watkyn LLC
    Quick Base Solution Provider
    (954) 900-6690 | hello@watkyn.com
    www.watkyn.com
    Watkyn LLC