Start page
Start page

Start page / Template development / Rules / Comparative expressions / <NOT_NULL/> tag

<NOT_NULL/> Zero test in dynamic forms

Input components may contain a value or may be “empty”. If no value is stored in the input component, this can return either an:

The <NOT_NULL/> tag can be set in the value determination area of the rule definition (or for the definition of a precondition) and checks whether an input component contains a value (TRUE) or returns NULL (FALSE). The check always refers to the value of an input component. To this end, it is also necessary to add a <PROPERTY/> tag (with the value attribute) inside the <NOT_NULL/> tag.

Important For input components that contain an empty value, which is the case for the FirstSpirit text input components, for instance, the <NOT_NULL/> check also returns TRUE.
To prevent storing the empty values, the <PROPERTY/> tag can be used in conjunction with the empty attribute for the check instead of <NOT_NULL/>.
Important Special conditions also apply to input components for which a default value has been added within the form template (more on this subject).

Example

As long as the editor has not selected anything in the combo box, the FirstSpirit framework highlights the input component in the workspace in color (see Display in the working area) and displays a note.

The surrounding <ON_SAVE/> tags also prevent saving of the form.

<RULES>
<ON_SAVE>
<WITH>
<NOT_NULL>
<PROPERTY source="st_combobox" name="VALUE"/>
</NOT_NULL>
</WITH>
<DO>
<VALIDATION>
<PROPERTY source="st_combobox" name="VALID"/>
<MESSAGE lang="*" text="&quot;Not Null&quot; comparison"/>
<MESSAGE lang="DE" text="&quot;Not Null&quot;-Prüfung"/>
</VALIDATION>
</DO>
</ON_SAVE>
</RULES>

© 2005 - 2015 e-Spirit AG | All rights reserved. | Last change: 2013-12-09