Auto Populated Text Box Not Saving

My main question goes something like this (Ignore arrows):

Line up of items in image below:

  • MAINFORM
    List 1
    • SUBFORM
      List 2
  • MAINFORM 2
    Text 1
    Text 2
    Both Buttons

If I make a selection in “List 1”, it will populate “List 2”, and also enter the ID of the selected value of list 1 into Text 2. I then make an entry into Text 1. When I hit save, It should save text 1 as a title, along with text 2 as List1 ID, and also add a autofill ID of it’s own. But it doesn’t. It will save Text 1 with the autofill ID, but the List1 ID is blank.

If I change the Input Required under data to yes, it errors on save saying:

Input required in field ‘ID_List2_List1’. Please enter a value

Even though I can see the ID in Text 2. It doesn’t recognize that there is anything in Text 2, however I can see the number in it. How can I get the contents of Text 2 to save with the rest? I’ve tried saving it with the Save Record Action of the button, and I’ve tried with macro (Uno.RecSave, same code I use with other forms), but I get the same results with both. Input Required.

Version: 25.2.2.2 (X86_64) / LibreOffice Community
Build ID: 7370d4be9e3cf6031a51beef54ff3bda878e3fac
CPU threads: 8; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

A conundrum for your perusal. Let me know if you need other info. I’ve tried to cover my bases, but I’m sure I’ve probably missed something.

Thanks for your time :smiley:

  • First problem: Are there no tables or queries the forms are based on? Without tables data will not be saved.
  • If there are, would it be possible to include a screenshot of the table relationships, a stripped down odb sample, or more securely, the odb form as a Writer document? It is hard to tell what is going on without knowing what tables or queries, and types of data the form is based upon. Without these one would need to reverse engineer the form, usually resulting in something that is far from the creator’s initial intent.
  • However to get started, check that the textbox is actually assigned the correct data field in the control properties and that the data type in the underlying table matches what is being entered. While debugging, remove the input required property until the data saving problem is solved.

The data does save, just without Text 2.

Let me strip this down, and I’ll get you a sample.

This should be helpful. Don’t mind the mess of code :face_exhaling:

Lists and Txts.odb (37.3 KB)