This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||
|
4D v20 R7
Primary key manager
|
![]() | OK | A valid primary key is set for the table. |
![]() | No primary key, eligible field(s) | The table does not have a primary key but contains at least one field that could become the primary key. |
![]() | No primary key, no eligible fields | The table does not have a primary key and does not have any fields that could become one (you will have to create a primary key field). |
![]() | Warning | The table does not have a primary key but it is not journaled ("Include in Log File" option disabled for the table). It is possible to hide tables that have this status by unchecking the option to display warnings. |
For each journaled table that does not have a primary key, the assistant displays a menu to set the action to be performed. You can choose from the following options:
Once you have made your settings, click on Apply... to apply the changes to the database or Close to close the dialog box without modifying the database.
When you click on Apply..., a confirmation dialog box appears listing the operations to be performed, then you can either confirm or cancel the operation:
If you have designated existing fields as primary keys, 4D checks each table to make sure that its existing data respects the rules concerning uniqueness and null values for this type of field. If, for example, a field contains duplicate values or null values, an error is generated:
You will need to find and remove these anomalies before you can enable journaling for the data.
Note: In order to facilitate the correction of errors related to primary keys, the primary key values are displayed in the Activity analysis page of the Maintenance and Security Center.
Product: 4D
Theme: Creating a database structure
4D Design Reference ( 4D v20 R7)