Discussions

Expand all | Collapse all

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

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

     
    Posted 11-19-2018 22:54
    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.


  • 2.  RE: Allow role to add a new record but not modify/delete existing records

    Posted 11-19-2018 23:08
    Are you trying to limit editing of a particular field or the whole record?


  • 3.  RE: Allow role to add a new record but not modify/delete existing records

     
    Posted 11-19-2018 23:12
    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. 


  • 4.  RE: Allow role to add a new record but not modify/delete existing records

    Posted 11-19-2018 23:19
    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.


  • 5.  RE: Allow role to add a new record but not modify/delete existing records

     
    Posted 11-24-2018 16:37
    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.