Field Syntax Codes

Field syntax codes specify the data entry pattern, the allowed characters, and whether fields are mandatory or read-only.

Field Syntax Codes

When entering codes, the maximum number of characters allowed is 31. Separate multiple codes with a comma. For example: UPC,ENT(#&&-###).

Field Syntax Codes
Code Description
ENT(Syntax) Entry format for user input. The syntax code has no effect on values assigned in ProcScript. For more information, see Entry Format.

For example, use ENT(DMY) if you want 4-digit year input (for example, 01-01-2014), or ENT(YMD) 2-digits (for example, 14-01-01).

BRM Check that brackets match.
LEN(n-m) Length of field or subfield: n = minimum, m = maximum

The LEN function counts the number of characters in a field. However, when it is used for a numeric field, leading zeros are not counted.

REP(n-m) Repetition of subfield: n = minimum, m = maximum
MOD(n) Use check digit modulo number n

Syntax Codes for Field Control

The following codes determine whether the field is required, visible, editable or can get focus.

Field Syntax Codes for Field Control
Code Description
DIM Disables the field so that it cannot be edited or get focus.
HID Hides field. No display, no edit and no prompt.

Not valid in character mode environments.

JMP Automatically jump to this field.
MAN Mandatory field (minimum length of one).

This affects both the field syntax (data entry) and the field interface (DBMS). It causes a runtime field syntax check, to ensure that the end user doesn't leave the field empty. It also instructs the DBMS connector that the field is mandatory ("NOT NULL" in SQL terms).

NDI Do not display the contents of this field.

NDI is a static property. It can only be set before the ProcScript edit statement is executed.

NED Do not allow the field to be edited.
NPR Do not allow this field to get focus (No prompt).

Note: If you use the NED or NPR codes, a user can still give focus to a field, and activate the detail and help triggers. To prevent a user from giving focus to a field, use the DIM syntax.

NIME 1 Switch to direct input mode in the Input Method Editor when focus moves to the string field.
YIME 1 Switch to the language-specific input mode in the Input Method Editor when focus moves to the string field.
1 If YIME and NIME are not specified, the IME is started according to the AUTOIMEOPEN initialization setting. If YIME or NIME is specified, it overrides the AUTOIMEOPEN setting. For more information, see AutoImeOpen.

Syntax Codes for Allowed Characters

The following codes determine the characters that are allowed in the field. The field's data type determines which codes are valid.

Syntax Codes for Allowed Characters

Code

Description

ASC

ASCII characters (Unicode range 00-7F).

Not valid for Number and Float data types. Default field syntax for Date and Time data types.

DIG

Digits only (0-9)

FUL

All Unicode characters, depending on value of $FULL_SYNTAX assignment setting. $FULL_SYNTAX

Valid only for data types String and Raw.

MUL

Extended ASCII characters (Unicode range 00-FF).

Not valid for data types Number, Float, Date, and Time.

NUM

Numbers only (0-9, . + -)

Valid only for data types String, Number, Float, Boolean, and Raw. Default field syntax for Number and Float.

LOW

Converts alphanumeric characters to lowercase.

UPC

Converts alphanumeric characters to uppercase.

NGLD

Gold characters not allowed

YGLD

Gold characters allowed

Syntax Codes for Data Cleanup

The following codes determine whether leading and trailing spaces, zeros, and control codes are kept or deleted.

Syntax Codes for Data Cleanup

Code

Description

DLC

Deletes leading control characters.

DLS

Deletes leading spaces.

DLZ

Deletes leading zeros.

In Forms, the internal value is changed but the displayed value may not be. In a server page, only the displayed value is changed, because there is no internal value.

DTC

Deletes trailing control characters.

NDCC

Keep any control characters.

NDLC

Keep leading control characters.

NDCX

Keep text control characters.

NDLS

Keep leading spaces.

NDLZ

Keep leading zeroes.

NDTC

Keep trailing control characters.

RCS

Replaces contiguous spaces with one space.

YDCC

Deletes all control characters.

YDCX

Deletes all text control characters.

Syntax Codes for Unifields

The following codes are applicable only to Unifields (used in character mode applications).

Field Syntax Codes for Formatting Unifields

Code

Description

NBLD

Bold not allowed.

NCR

Carriage return not allowed. Only one-line field allowed.

NITA

Italics not allowed.

NUND

Underlining not allowed.

OVS

Overstrike.

YBLD

Bold allowed.

YCR

Carriage returns allowed.

YITA

Italics allowed.

YUND

Underlining allowed.

Related Topics