Copying Text Box Value to Table and Refreshing Table Control in LibreOffice Base

Event is ID - On losing focus
But I think better is Mouse button released (to click inside control).
Control = NOME in enclosed new dummy Firebird DB without plot_id control, as per your design.

It could be. Must check what suits your setup better trying. And what Events are disponible of course.
And you can add Event (no need to just 1 Event). So you can add another Event if you want.

I think better having it, but no need. At first I didn’t grasp you don’t have it in the form.
Check enclosed new dummy DB, Form TESTE.

What change? Routine saves selected plot_id (be it present in the Form or not) without need to have changed data in the selected row.
If you have Form with Sub Forms linked together, when you change record (row), linked Form(s) row(s) change. But of course we must check your specific setup and needs.
And yes: basic way to automate is
TheForm.reload
But first we must check your setup (forms design) and how you do want them working together.
 
Check this new dummy DB (Firebird).
LO 25.8.2.2
OS: Windows 11 X86_64 (build 26200)
PersistID.odb (20.0 KB)

I am able to open CopyingTB.odb after having done sudo apt-get install libreoffice-sdbc-hsqldb
I am not able to open CTBTT.odb or PersistID.odb because I get the error

“The connection to the external data source could not be established. No SDBC driver was found for the URL ‘sdbc:embedded:firebird’. at ./connectivity/source/commontools/dbexception.cxx:413”

when I try to open tables of forms. Looking at CopyingTB.odb where/when is the macro engaged? I looked in the events of the control and form and did not see anything.


TableControl > ID > Column > Events (of the column).
But please open and check these 2 new dummy DBs I sent, in another machine with another LO’s install. I included routine for your layout without the plot_id control, and Event After update.
 
ID_Event
 
Enclosed example persists id both on

  • clicking NOME
    or
  • After updating GRANDEZA

Without id showing up in the TableControl.
PersistID_HSQLDC.odb (13.4 KB)

I can not open them with LO 25.8.22 or LO 7.3
What version did you use to create them?
Also, when I look at CopyingTB.odb I do not see the macro selected in the events of the form or the control.

Version
This machine.

Open in this machine:


Coluna

Now I can no longer open the tables of CopyingTB like I could before. I’m not sure what changed because I am getting the same errors for CCTBTT.odb and PersistID.odb

SQL Status: HY000

The connection could not be established. The database was created by a newer version of LibreOffice. at ./connectivity/source/commontools/dbexception.cxx:413

I have installed Version: 7.4.7.2 / LibreOffice Community
Build ID: 40(Build:2)
CPU threads: 4; OS: Linux 6.1; UI render: default; VCL: x11
Locale: en-US (en_US.UTF-8); UI: en-US
Debian package version: 4:7.4.7-1+deb12u9
Calc: threaded

and
Version: 25.8.2.2 (X86_64)
Build ID: d401f2107ccab8f924a8e2df40f573aab7605b6f
CPU threads: 4; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

I think this explains the problem OpenOffice file: The database was created by a newer version of LibreOffice - #5 by Ratslinger

I was able to recreate the tables and form from CopyingTB.odb into LAndpLAN.odb. I recreated the Plots module and the PersistID macro and assigned it to mouse release and it works! It gives this error but I added a control to view the PLOT table and I can see it is working.


Now I have to modify the macro to effect the Plot table using the forms in LANdpLAN.odb

… so first of all you must repair yor install.
And, as I said before, open for study the “exercises” in other machines with fresh LO’s installs.
Good luck!

:grey_question: :grey_question: :grey_question:
Persisted ID should never show up in a Form. It’s a “filter” parameter for further uses.

great this one I can open! THank you

I’d like to find help wherever I can on this problem. It’s very difficult for me.