Not able to see table defaults in forms

Using LibreOffice Community 7.1.3.2 (x86) on Windows 10.0, split HSQLDB 2.3.2
Table “Test” has fields [“Code” VARCHAR(3) DEFAULT ‘903’] and [“City_FK” INTEGER DEFAULT 1].
Using the wizard, a Data Input Form was created. I would like a user to see the TABLE DEFAULT and be able to accept or change that.

The uploaded file is a ZIP’ed file of the .odb and database folder. Remove the “.db”, unzip that to your test folder.
Trouble.zip.odb

A “driver” folder with hsqldb.jar and sqltool.jar is also needed. Even zipped hsqldb.jar is too big for me to upload here.

Please advise if these are needed and how to send them.
Thank you for your help.

Hello,

Have actually given you the answer in the previous post → table design view default date

The answer there had a comment with a link referring to a Bug report. This was noted and is relevant to defaults. Repeated here it is tdf#104375.

There are three defaults → table design; table UI; controls on form. It is not the easiest to comprehend but then again it is an open bug.

For what you want you can set the defaults in the UI:

image description

image description

Because this is a split DB, you cannot edit existing tables through the UI. You can delete a field and add a new one but not modify one. With the UI either delete then add or create a new table.

You should also review those posts/bug report given.

Edit 2021-07-20:

There were some errors in the sample you provided. Will attach an HSQLDB embedded Base file (works the same in you split DB) with the correct settings as now noted earlier in this post.

Table SQL does NOT need defaults in this case and the GUI defaults will be used as pictured above (this is explained in the bug report). Also because of this direction the control defaults are not needed (these were used in comments in your previous question). If wanted, here is the SQL for the tables:

CREATE TABLE "Test"(
"id" INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,
"Code" VARCHAR(3) NOT NULL,
"City_FK" INTEGER NOT NULL,
"Note" VARCHAR(20));

CREATE TABLE "Cities"(
"id" INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,
"City" VARCHAR(20));

Sample ----> FixedTrouble.odb

Note - Because of your design, if you add a record in the first form, you will not see it in the second form until you refresh the second form (use the navigator).

Edit 2 on 2021-07-20:

To also present the use as previously described the is another sample attached. This uses you table SQL with the default values. It also requires a small macro for each form to correctly set the list box. This was noted in a comment on the previously noted question. I post this only to show what was mentioned previously does also work.

Sample ------- FixedTroubleSQLDefault.odb

Thank you, @Ratslinger. Once again I am confusing us. I have reviewed tdf#104375. I was not able to find an answer or work-around with my searches. The tables were created by SQL. The TABLE FIELD default value is stored when the record is saved provided that it was not overwritten. FORM defaults may be set and seen and will be saved into the table.

The question, or problem, remains:: that of displaying the TABLE FIELD DEFAULT to the user in a FORM.

I may try to do this with a form filter.

Thank you again. I may not get back soon as I have real-world things that I need to get done first.

My table SQL:

CREATE TABLE “Test”(

“id” INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,

“Code” VARCHAR(3) DEFAULT ‘903’,

“City_FK” INTEGER DEFAULT 1,

“Note” VARCHAR(20))

CREATE TABLE “Cities”(

“id” INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,

“City” VARCHAR(20))

@FKlusmann,

No confusion. Understood correctly. All methods presented in this and previous post were tested and gave the results you noted. To eliminate further problems, will edit answer to include an HSQLDB embedded sample with your example as a basis. This works the same in the split version you have and the embedded version.