Forum Discussion
ArchiveUser
7 years agoQrew Captain
This works well. Thank you!
Regards,
Samuel
Regards,
Samuel
AdamKrzyzanek
6 years agoQrew Captain
Is there a way to do similar in Grid Edit?
When Lock MD = Yes than you cannot Edit other Field anymore?
------------------------------
Adam Krzyzanek
------------------------------
- DillionMoore5 years agoQrew 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
------------------------------- AustinK5 years agoQrew CommanderInstead of having to maintain a list of users and what text role they may be in you could simply pull the actual current users role. Going by names might work if their company is only a few people but it will quickly break down when more users get added or if another user has the same name.
https://login.quickbase.com/db/6ewwzuuj?a=dr&rid=201-------------------------------------------
Original Message:
Sent: 09-17-2020 15:38
From: Dillion Moore
Subject: Lock record from edits after a certain condition is met
@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- DillionMoore5 years agoQrew MemberAustin K, that's a good point, my company is currently only low double digits, so i guess instead something like:
if([Edit Status] = "Locked" and toText(UserRoles("Name"))<> "Administrator", "Sorry but you may not edit this record. Please speak with a supervisor")
Thanks for that catch! Still learning the functions, didnt even think to look past User to see if there was a userRole.
------------------------------
Dillion Moore
------------------------------