Edit Any Table
[resolved] Unable to edit primary key field (4 posts)

  1. abouttheinn
    Posted 2 years ago #

    I have a simple table with a primary key on a unique text field. To my surprise, one of our users needed to change the value in this field, but in Edit Any Table it is not editable (the other fields are editable).

    This is a great plugin (thank you!), but it would be a big help if editing this field could be enabled.


  2. redeyedmonster
    Plugin Author

    Posted 2 years ago #

    Hi - it is unusual to change a primary key after it has been assigned. Edit-Any-Table requires a primary key to know which record to update or delete, changing the key will not work because Edit-Any-Table will no longer have a reference to the record to change. May I suggest that you make this text field a unique field rather than a primary key (if it is important that it is unique) and then create an auto incrementing primary key that Edit-Any-Table can use as the record reference. I hope this helps solve your issue.

  3. abouttheinn
    Posted 2 years ago #

    Yes, I realize it is unusual. I've tried your solution of adding an A-I ID field as primary key to see if the user will be able to manage with that. I know it is better DB practice, but once we expose ID numbers to them, best practices may change...

    Thanks again for your plugin, and your reply.

  4. brinkle
    Posted 1 year ago #

    how to control the user privileges

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Edit Any Table
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic