Lock row once status changes

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
utony
Veteran Member
Posts: 113
Joined: 2020-04-03 18:37

Lock row once status changes

Post by utony » 2024-08-03 12:33

I am looking to see if someone else has accomplished this yet. I also am seeking guidance on code and/or examples.

I am looking to have a data point on a table called, report status. When the report status is moved to "submitted for supervisor review", I want the table to only have a certain user group from that point further that can edit the row.

So group 1 from the start of the record until status change, "submitted for supervisor review" will have C.R.U., once that stauts change is made to "submitted for supervisor review", then R only.

Group 2 will have C.R.U., unitl the status of the record is marked by the supervisor as "closed", the group 2 will on have R only.

Group 3 "admin" will remain with the R.U.D of the row from that point forward with now control besides R from Group 1 & 2.

I am trying to build a workflow process... Any help would be welcome. Thank you AG family.

Tony

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1667
Joined: 2018-04-01 10:12

Re: Lock row once status changes

Post by pbottcher » 2024-08-03 19:37

Hi,

what you could to is to check in the detailview the status and the usergroup. If it fits your combination, the user can view the record, otherwise you could redirect the user to the tableview. So that he would not be able to edit the record (this would also mean that the user could not see the record in detailview anymore).
Another solution would be to use the membership_grouppermissions table an set the permission for the group(s) accordingly.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

utony
Veteran Member
Posts: 113
Joined: 2020-04-03 18:37

Re: Lock row once status changes

Post by utony » 2024-08-03 21:27

I am will aware of the group perms, but it's a bit more complicated. And that is why I was seeking some guidance. The user needs to to be able to C>R>U, up to the time they change the row status, then the row needs to look them out and only allow R, then the supervisor will have CRU, until they change to the status of the row and then they will only have R, then it is onto the Admin group which will remain with the CRUD power.

Let me know your thoughts. Thanks

Post Reply