How can I lock the contents of a form?

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered
Hi Quickbase magicians,

I have a form that is likely to be edited multiple times by different people before it is complete.
Once it is complete, however, I would love to have the ability to lock the contents of that form so that only people in the role 'Administrator' can edit it.

Is there a way I can do this?

Thank you!

Photo of Barnee

Barnee

  • 0 Points

Posted 3 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
No problem. Role permissions are the trump card over everything and they are rock solid.

Just set a custom rule for all the Roles (one by one) except Admin such that users are allowed to edit as long as the record is not compete.
Photo of Barnee

Barnee

  • 0 Points
That makes a lot of sense. Thank you for the advice! I will be doing this for sure
Photo of Barnee

Barnee

  • 0 Points
I have set it up in way that mostly works. However I want to refine the custom rules further, but applying multiple rules seems to work in the way of 'If all of these rules are true, then let the user edit this form', rather than 'if any of these rules are true, let the user edit this form' (which is what I want). Is there a way I can do this?

Thanks!
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
Ya, so the Role Permissions are ANDs as you have discovered.  No problem.  Just make a new field called [OK for Regular Users to edit] and make the checkbox formula as complicated as you like.  Then use that new single field in the Role Permissions Custom Rule.
Photo of Barnee

Barnee

  • 0 Points
Oh I think I understand. Do you mean actually writing a formula, or just using form rules? (I don't know how to write a formula)

I have created a form rule that has all the parameters I want. But the rule has not generated the 'Otherwise' behavior. Ie, "If these conditions are not true, then uncheck the box".

Doesn't this mean that if one person in this role edits the form, then it will be permanently checked?

(I attached an image to the original post)
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
You are off track trying to do it in form rules.  It needs to be a formula.

I suggest that you make a new field of type Formula UserList called perhaps [All All Users involved in Task] and then use this help text here to make the formula to concatenate all those users together int one field. https://www.quickbase.com/db/6ewwzuuj?a=dr&r=fx&rl=baz

 Then for the Custom Role Permission rule you will be able to say

where [All Users involved in Task] includes the current user
Photo of Barnee

Barnee

  • 0 Points
Ah okay, I understand. That looks fairly simple after reading the page on your link. I will let you know if I run into any issues.

Thank you!
Photo of Barnee

Barnee

  • 0 Points
Hi again,

I am having trouble getting to this to work. I have created the user list formula which defines the set of people that I want to allow to edit the form, and it appears to work.

But the Custom Permission Rules tool doesn't give me an option to select 'the current user' for my user list formula field, "Rule - EE (DO NOT DELETE)". I added another screen cap to the original post.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
Huh??  If you made the new field which is the UserList formula field then that is what you use in the Role permissions.  That is why you made the field, right?
Photo of Barnee

Barnee

  • 0 Points
Sorry, maybe I explained that badly.

I have used that User List Formula field in my Role permissions, it is the field "Rule - EE (DO NOT DELETE)". But it does not give me the option to say 'If the current user is a part of this dynamic list, then let them edit the form'. It just leaves me with "If the dynamic list contains these words, then let them edit the form".
Photo of Barnee

Barnee

  • 0 Points
Okay, I manged to resolve my problem. I had to manually reference 'the current user' using "_curuser_". This has worked.

Thank you for your help!
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
I'm surprised it did not offer up current user. Another method would have been to create a formula User field called [Current User] with a formula of User()