Forum Discussion

ArchiveUser's avatar
ArchiveUser
Qrew Captain
6 years ago

Lock record from edits after a certain condition is met

Hi all,

I'm currently trying to track the person who changed a particular status to 'Closed', without the added capability of QuickBase's audit logs atm.

Right now, this is my text formula and it's working fine.

If ([Status]="Closed",UserToName([Last Modified By]))

However, there is a possibility that this might be changed in the case whereby someone modifies it accidentally afterwards, etc. 'Closed' entries should only be available for viewing and not editable afterwards - unless allowed.

I wonder if there is any way i could 'lock' the record in place from any future edits so that the information recorded is as accurate as possible? Or that a particular group of user would be unable to edit henceforth unless an administrator changes the 'Status' to open, etc.

Thank you!

Regards,
Samuel


6 Replies

  • I would simply set a custom permission for editing records on that table for each role you want to check.

    The custom permission would only allow editing privileges for that particular role if the status was not equal to closed.

    Of course, allow admins to always be able to edit in case you ever need the override you mention.

    Hope this helps!

    ~Rob
    • AdamKrzyzanek's avatar
      AdamKrzyzanek
      Qrew Captain

      Is there a way to do similar in Grid Edit?

      When Lock MD = Yes than you cannot Edit other Field anymore?





      ------------------------------
      Adam Krzyzanek
      ------------------------------
      • DillionMoore's avatar
        DillionMoore
        Qrew Member
        @Adam Krzyzanek I believe, but not entirely sure, it may be possible to lock this down via Custom Data Rules. (Located under Advanced Settings in any table, at the bottom)
        Add a field (Field name - Current User, field type - Formula Text) that pulls users and ties them to their role, and returns the role value. (i.e. Admin, Tier 1, Tier 2)
        Case(true,
        User() = "Bob", "admin",
        User() = "Steve", "Tier 1",
        "")
        Then add the custom data rule code, something like:
        if([Edit Status] = "Locked" and [Current User] <> "Admin", "Sorry but you may not edit this record. Please speak with a supervisor")

        Please note I have not tested this yet, but this is something i have been wanting to do and will probably be trying to do here soon. I will post an update once i have confirmed or determined its not possible. Hopefully this helps some one and maybe they can flesh the idea out before i get around to it.

        ------------------------------
        Dillion Moore
        ------------------------------