Allow role to add a new record but not modify/delete existing records

  • 41
  • 1
  • Question
  • Updated 2 months ago
  • Answered
How do I allow a role to add new records to a table, but restrict their ability to modify or delete existing records? 

Case: I want to 'lock-in' the Customer name, so that once it's created no-one can change it.
Photo of AO

AO

  • 304 Points 250 badge 2x thumb

Posted 2 months ago

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

QuickBaseCoach App Dev./Training, Champion

  • 57,702 Points 50k badge 2x thumb
Are you trying to limit editing of a particular field or the whole record?
Photo of AO

AO

  • 304 Points 250 badge 2x thumb
Just one field- so a user could add a record to the Customer table with Name field: ABC Inc.. However, that same user wouldn't be able to change the Name. Fields like Address, Phone, etc would ok to modify. 

We're using a report from this table to update a SQL database, and I need the Name field to remain consistent once created. 
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 57,702 Points 50k badge 2x thumb
I would make a formula numeric field called [Record ID# mirror] with a formula of [Record ID#] 

Then make a dynamic form rule

when [Record ID# mirror]  > 0
make read only [customer name]

In Add mode that field will be zero or maybe blank.  But once saved, then the name field will not be editable. however, that will not prevent Grid Edit.

That would be a separate question.
Photo of AO

AO

  • 304 Points 250 badge 2x thumb
Thanks! I ended up using a form rule: when date created is on or before the current date then make read-only Company Name

Is not ideal that users can still change customer names in grid edit, but it's a start.