The "AutoValue" field does not populate when erroneous entries during the Table Creation Wizard cause an error at the end of the Table Creation Wizard. (i.e. "Use Wizard to Create Table...")
Steps to Reproduce:
REPRODUCING THE ERROR:
1. To reproduce the error, start with a new LibreOffice Base database and open the table Wizard to create a new table.
2. Select "Create a new database" and Embedded database: "HSQLDB Embedded".
- Then, click the "Next" button.
3. In the next screen: "Decide How to Proceed After Saving the Database".
- Accept the default settings:
- "Yes, register the database for me"
- "Open the database for editing"
- Then, click the "Finish" button.
4. The Save window will appear.
- Select a Name for the Database
- Save the file in a suitable location.
- Click the "Save" button.
5. The LibreOffice Base Window will open.
- Under the tasks select "Use Wizard to Create Table..."
6. The Table Wizard appears.
- Select the category: "Business".
- Select the table sample: "MailingList" .
- Select "MailingListID" from the available fields and add it to the selected fields on the right.
- Select "FirstName" and "Lastname" and add them to the selected fields on the right.
- Click the "Next" button.
8. In the "Set field types and formats" window, accept the defaults for everything except the "AutoValue" of "MailingListID".
9. For "MailingListID", change the AutoValue to "Yes".
- Then, introduce an error by entering "0001" for the "Auto-increment statem".
- Note: Entering "+1" also causes an error.
- Click the "Next" button.
10. Now the "Set the primary key" window appears.
- Keep the default "Create a primary key" checked.
- Then, choose "Use an existing field as a primary key".
- Under the "Fieldname" drop down menu, choose "MailingListID".
- For "Fieldname" keep the default setting with "Auto value" checked.
- Click the "Next" button.
11. The "Create Table" window.
- Accept the default table name of "MailingList"
- and the default setting "Insert data immediately".
- Click on the "Finish" button.
12. Immediately, an error message appears.
- In this case it reads:
"Unexpected token: 0001 in statement [CREATE TABLE "MailingList"
("MailingListID" INTEGER NOT NULL 0001]".
- Click the OK button to clear the error pop-up and go back to the wizard.
13. Click the "Back" button twice so that you view the "Set field types and formats" window.
- Correct the error, by removing the "0001" from the "Auto-increment statem" box.
- Click the "next" button twice.
I would expect this correction to resolve the error but it does not. Instead the the Table Creation Wizard must be started over and run without error before the "Autovalue" works properly.
14. Finally, click the "Finish" button.
15. The table will come up for editing.
- However, the "MailingListID" field does not "AutoValue" like it is supposed to.
- This "AutoValue" error prevents saving of the table and prevents saving any records in the table.
- The following error message appears, when attempting to insert a new record:
"Error inserting the new record"
"Attempt to insert null into a non-nullable column:
in statement [INSERT INTO "MailingList" ("FirstName", "LastName") VALUES (?,?)]"
-Wizard allows for error to be introduced and does not explain what entries are allowable.
-After error occurs backing up and correcting the error does not fix the error.
-The error is only corrected if the Wizard is started over and run without error.
-The Table Wizard should not allow invalid entries.
-A help link should be included next to the "autovalue" option explaining what suitable entries should be.
-The "autovalue" field value should not be editable unless there is a reason to edit it.
User Profile Reset: No
- Backing up and correcting the error within the wizard should fix the problem.
- When an error like this occurs, it should not require starting over with a new table.
- The "AutoValue" failure only results when an error occurs during the wizard.
- If no error occurs during the table creation wizard, the "AutoValue" works properly as expected.
- Pertinent LibreOffice Help documentation:
- (See Search Term: Database Wizard (Base))
- I was building a database to create address labels. So,...
- (See Search Term: labels;from databases)
LIBREOFFICE VERSION - In which bug was discovered:
Build ID: libreoffice-220.127.116.11-snap1
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3;
Locale: en-US (en_US.UTF-8); Calc: group threaded
(The release was provided by Canonical.)
OPERATING SYSTEM - On which LibreOffice was installed.
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
POSSIBLE RELATED BUGS:
Bug 108058 - After renaming Primary Key AutoValue feature fails
- The potential of this error could be lessened, if the desired entry in the "AutoValue" box was more clear. A link next it giving explanation would be helpful.
- Also, the "AutoValue" box should not be editable, unless there is a reason for changing it.
INCLUDED SAMPLE FILES:
- Working database with functioning "Autovalue".
- Non-working database with non-functioning "Autovalue".
Created attachment 147794 [details]
Sample Database with Functioning "Autovalue"
Created attachment 147795 [details]
Sample Database with Non-functioning "Autovalue"
Created attachment 147796 [details]
Error Message seen at end of Table Creation Wizard
Created attachment 147797 [details]
Error Message when attempting to add entries to a non-function database.
This looks to be a duplicate of "Firebird: EDIT: Table wizard does not set field properties "AutoValue" to "Yes" for user selected primary key field."
Setting as such.
*** This bug has been marked as a duplicate of bug 117527 ***