getSyntaxProperty()

Retrieves the value of the specified syntax property for a field.

Return=FieldObject.getSyntaxProperty(SyntaxProperty)

Arguments

SyntaxProperty—name of a supported field syntax property.

Return Value

Return—value of the named syntax property

Exceptions

The following exceptions may be thrown:

Description

The getSyntaxProperty function only returns the specified property if it was set in the browser using JavaScript, not if it was set in the server before being sent to the browser. The get the value of syntax properties from the field definition, use the getDeclarativeSyntax function.

Syntax Properties Supported by the JavaScript API
Property JavaScript Data Type Values Description/Remarks
NED Unsupported. Use property html:readOnly instead No edit allowed in this field.
DIM Unsupported. Use property html:disabled instead Dim field. No edit and no prompt.
ENT string Uniface entry format string Syntax for data entry. For example, "&*" (zero or more [a-zA-Z]). For more information, see Field Syntax Codes.
LEN object { min:Number,max:Number } Length of field or subfield.
ASC boolean   ASCII, in Unicode range 00-7F
BRM boolean   Check that brackets match.
DIG boolean   Digits only (0-9)
DLS boolean   Delete leading spaces.
DLZ boolean   Delete leading zeros.
LOW boolean   All lowercase
MAN boolean   Mandatory field (minimum length of one).
NUM boolean   Numbers only (0-9, . + -)
RCS boolean   Replace contiguous spaces with one space.
UPC boolean   All uppercase

getSyntaxProperty

The following example, gets the length of fieldx.

fieldx.getSyntaxProperty("LEN")

Related Topics