OpenWGA 7.6 - TMLScript reference

WGA » WGA.Validate
Method :

isEmpty([fieldname])

On object WGA.Validate
Usage Returns if the WebTML form field is empty
Description

This method works with all kinds of form fields, single or multiple value, regular data or relations. It however uses only the current WebTML form of the WebTML runtime and its fields.

A single value field of regular data is interpreted as empty if it contains null (as parsed value), an empty string.

A single relation field is interpreted as empty if the relation does not point to any document.

A multivalue field is interpreted as empty if it contains no value or a single value that matches the empty characteristics for single fields.

Parameters

fieldname (String, optional):

Name of the field to test. In WebTML input validations this can be omitted to test the current field.

Return value True if the field is empty (Boolean)
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events