Description: When creating a form with a dropdown list, my data (stored in MySQL database) had no primary key defined (nor foreign key). I was able to create the dropdown list. But when I used the form the list was empty and disabled. There was no error message. Expected behavior : have an error message saying the a primary key should be defined on which field of which table. Steps to Reproduce: 1. Create 2 tables with a common field but do not declare primary key 2. Create a form with first table 3. Add a dropdown list from the second table 4. See the result in Display mode Actual Results: The dropdown list is empty and disabled in the form Expected Results: An error message that helps identifying the issue and not lose time Reproducible: Always User Profile Reset: No Additional Info: When creating the dropdown list there should have been an error message
Usability issue
@Frank : unfortunately, it is well known that a primary key is required in the table in order to allow writing to that that table. That requirement extends to controls to be able to fetch and allow writing to any given table bound to the form. For example, in the online help : https://help.libreoffice.org/6.0/he/text/shared/explorer/database/tablewizard03.html "For some database systems within LibreOffice, a primary key is mandatory for editing the tables." Also the FAQ: https://wiki.documentfoundation.org/Faq/Base/009 and even the older OpenOffice.org forum documentation : https://forum.openoffice.org/en/forum/viewtopic.php?f=83&t=26448 So I'm not really certain that this is an enhancement request that would even be accepted. Personally, I think it would be a useful addition to the UI experience, but the functionality you are requesting would require quite a lot of developer effort.
Could imagine a note in the status bar in the table editing window. Would that be of help, Frank?
Have tested this. No problem to fill the dropdownlist. The dropdownlist shows the connected value and is disabled because you can't change any content in GUI of Base for tables without a primary key in MySQL/MariaDB. You could only see the content you imported, in my test two tables imported from Calc. You will get this error message for a primary key when creating a table. Could be you didn't create the table in Base, so you couldn't get this message.
So let's resolve WF. Please reopen in case there is need for improvement.
My suggestion to Frank would be to file a new bug report, or seek out an existing report, and add comments to that existing report, about an enhancement request to support editing of data in mysql table through the LO user interface without the requirement for primary key. The requirement for a primary key in order to be able to add/modify data in a table or linked tables is an artificial, and somewhat arbitrary, limitation imposed by the LibreOffice Database code. I don't believe that there is any easy fix to this either, but if it was someday implemented correctly, it would solve the problem exposed here by the OP.