It seems Base forms were not properly respecting the 'Input Required' setting on forms. This was corrected in 6.1.3 (and later). The result of this is that if a database field is defined as optional, but the corresponding form field is marked 'input required', the user is given an error message stating: "Error writing to the database" "Input required in field 'xyz'. Please enter a value". This implies there's a database problem, when there isn't. There's a form problem. This might not matter much in normal situations, but given the change (correction) in the behaviour of Base, I believe many will be seriously misled by this. The fix can potentially affect hundreds of fields in many, many forms, and can be a lot of work to adjust to. A misleading error message will cause problems, and probably more duplicate issue reports raised unnecessarily.
See also : https://bugs.documentfoundation.org/show_bug.cgi?id=120712#c2
@Julien Nabet, Any opinion here?
About "Input required in field 'xyz'. Please enter a value"., it's in https://opengrok.libreoffice.org/xref/core/include/svx/strings.hrc?r=c89a4996#1108 but "Error writing to the database" is nowhere to be seen in Opengrok so don't know where it comes from :-(
AFAIR, the same message is used whether the restriction is in the form or in the database.
Since LibreOffice 6.1.4 (and 6.2.0.0 from somewhere in early December 2018), odb files last saved by earlier versions of LibreOffice will have all form controls set to "Input required: no". See bug 120353 comment 27. This should massively help to sidestep this. Giving a different error message when the "input required" bit comes from the form or from the database can still be considered a worthy enhancement.
(In reply to Lionel Elie Mamane from comment #5) >... > Giving a different error message when the "input required" bit comes from > the form or from the database can still be considered a worthy enhancement. If I understand well, you want to distinguish these 2 cases: - xFirstControlWithInputRequired - xFirstGridWithInputRequiredColumn see https://opengrok.libreoffice.org/xref/core/svx/source/form/formcontroller.cxx?r=cec7ae9f#219 So in function FormController::approveRowChange (cf https://opengrok.libreoffice.org/xref/core/svx/source/form/formcontroller.cxx?r=cec7ae9f#3706) instead of: 3706 OUString sMessage( SvxResId( RID_ERR_FIELDREQUIRED ) ); 3707 sMessage = sMessage.replaceFirst( "#", rColInfo.sName ); It would be something like: OUString sMessage( xFirstControlWithInputRequired?SvxResId( RID_ERR_FIELDREQUIRED _DB):SvxResId( RID_ERR_FIELDREQUIRED_FORM )); (or reuse RID_ERR_FIELDREQUIRED for DB and change the content to explicitly quote database and add RID_ERR_FIELDREQUIRED_FORM)
Moving to NEW
Isn't this bug already solved. Since https://bugs.documentfoundation.org/show_bug.cgi?id=150577 has been resolved it works as it should: Form fields, which are created new, will be set to Input required → no by default. If input is required by the database (defined in table) you will get a special error of your database. This error is always in English. If input is set "required" in a form control, you will get an error message of the form. This error is in your GUI language and much more user-friendly like the error, which has been returned by the database. All this is working well with LO 7.4.2.3. Shouldn't we close this bug?
(In reply to Robert Großkopf from comment #8) > If input is required by the database (defined in table) you will get a > special error of your database. This error is always in English. Yes, you are right, I think this has changed at some point. LibreOffice used to try to enforce the NOT NULL on the table itself (and give the same error message as when the _form_ requires a value), now it just lets the database deal with it. That's better because the database may have a trigger that chooses a value, or another mechanism that LibreOffice doesn't know about. I don't immediately find the commit that did that, but it jogs my memory. (Incidentally, some databases allow error messages to be in another chosen language, not only English.)
All OK by me. Thanks.