Change "key" field if it is defined as an internal value stored in a text field? | Community
Skip to main content
Level 4
January 3, 2022
Solved

Change "key" field if it is defined as an internal value stored in a text field?

  • January 3, 2022
  • 1 reply
  • 943 views
Hello there! 

I am working on a small manually maintained table that contains manually selected titles in a TV streaming set-up. 
 
The table will not contain more than apprx. 20 entries added by a configurater in ACC. 
 
Since the table is this small, I wanted to simply set "title" as the key field, since the title will always be unique and only exist once in the table. The issue is, that when the title is set as the key, the configurator is not allowed to change the value of "title" after the entry has been created (Guessing it is because it is the key field???). 
 
I am trying to do it this way to avoid using autoPk and a custom sequence, because I found it too advanced for such a simple table. However, this issue is a bit annoying, especially from a UX point of view. 
 
My question (short): Can I somehow allow editing a key field in a table, so I can avoid setting up autoPk="true" with a custom sequence in this case? 
 
Addition: We are using a form to add/edit/delete entries in the table. 
 
 
Thanks in advance! 
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Jyoti_Yadav

Hi @sorendp ,

 

We cannot edit Primary Key. As the purpose of primary key is to have unique identifiable value in the table.

You can use primary key different from title and then edit the title field.

If you want to keep title as primary key, then whenever you want to edit its value, you need to make new data entry and delete old one.

 

Thanks,

Jyoti

1 reply

Jyoti_Yadav
Jyoti_YadavAccepted solution
Level 8
January 4, 2022

Hi @sorendp ,

 

We cannot edit Primary Key. As the purpose of primary key is to have unique identifiable value in the table.

You can use primary key different from title and then edit the title field.

If you want to keep title as primary key, then whenever you want to edit its value, you need to make new data entry and delete old one.

 

Thanks,

Jyoti

SorenDPAuthor
Level 4
January 4, 2022

Hi! 

 

Thanks for your reply. That is also my understanding. Thanks for confirming!