Issue 92322 - FormsCheckRequiredFields should be availayble on a per field basis
Summary: FormsCheckRequiredFields should be availayble on a per field basis
Status: CLOSED FIXED
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOo 2.4.1
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: marc.neumann
QA Contact: issues@dba
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-31 08:47 UTC by drewjensen.inbox
Modified: 2013-08-07 15:45 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description drewjensen.inbox 2008-07-31 08:47:06 UTC
Currently ODB file and logical forms support the property
FormsCheckRequiredFields, this property enables or disables the checking for
required fields when posting a record to the database engine.

Perhaps a property CheckRequired (boolean) added to the base control type. By
setting this property to FALSE no check would be made to see if the field is
required in the table schema.

For more information on this issue you can look at the comments section of
closed issue http://www.openoffice.org/issues/show_bug.cgi?id=78987
Comment 1 Frank Schönheit 2008-07-31 22:44:54 UTC
nice idea.
Comment 2 Frank Schönheit 2008-09-19 11:32:49 UTC
fixed in CWS dba31c

find more information about this CWS, like when it is available in the master
builds, in EIS, the Environment Information System:
http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=DEV300%2Fdba31c
Comment 3 Frank Schönheit 2008-09-19 11:33:59 UTC
There now is a property "Input required" for all form controls which also
support the "Data field" property.

FYI, this is the feature mail I'll write when the CWS goes to QA:

All form controls which can be bound to a database column (i.e. have the "Data
field" property) now have a new property called "Input required".

Description
=========

This property controls whether or not the input of this field is checked against
being empty (NULL). It is evaluated for controls which are bound to a database
field which is defined as required (i.e. which is not allowed to contain the
special NULL value), immediately before the current record of the form is to be
written into the database.

If the property is set to "Yes", and the field contains no input when the
current record is to be written to the database, then an error message will be
shown to the user, and the respective control will be focused afterwards. Note
that this is the known behaviour so far - the property defaults to "Yes" so that
newly created controls behave as they would do in previous OOo versions.

If the property is set to "No", and the field contains no input when the current
record is to be written to the database, then this is ignored. It's up to the
underlying database to either reject the update, or fill the respective column
with a server-side default value.

Functional Constraints
=================

If the "Form data input checks for required fields" option in the advanced
settings of the database document (Edit / Database / Advanced Settings ...) is
*not* checked, then the "Input required" property for all controls in all forms
in this database document does not have any effect, since the document-wide
setting overrules the per-control settings.

UI
==

In the property browser, the "Input required" is located immediately below the
"Empty string is NULL" property, if it is present, otherwise immediately below
the "Data field" property.

If the "Data field" is not set (i.e. empty), then "Input required" is disabled,
since it would be evaluated for bound controls only, anyway.

If the "Empty string is NULL" is set to "No", then "Input required" is also
disabled, since "Empty string is NULL" being "no" implies that when the user
does not enter any value in the control, then an empty string, instead of the
dedicated value NULL, is written, so there's always a non-NULL value no matter
the user's action.
Comment 4 Frank Schönheit 2008-11-04 13:16:35 UTC
fs->msc: please verify in CWS dba31e
Comment 5 marc.neumann 2008-11-11 13:55:51 UTC
verified in CWS dba31e

find more information about this CWS, like when it is available in the master
builds, in EIS, the Environment Information System:
http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=DEV300%2Fdba31e
Comment 6 drewjensen.inbox 2009-05-05 05:48:40 UTC
tested w/ 3.1 RC2, Ubuntu

Closing