fieldsyntax
Set the syntax attributes of the specified field.
fieldsyntax Field,AttributeList
Example: fieldsyntax FIELD1, "NED,NPR"
Parameters
Parameter | Data Type | Description |
---|---|---|
Field | String | Name of the field |
AttributeList | String | Comma-separated list of field syntax attributes, or an empty string. |
Return Values
None.
Use
Allowed in all component types except self-contained Services.
Description
The fieldsyntax statement dynamically sets the syntax attributes of Field for the currently active occurrence. If AttributeList contains an empty string, the syntax of Field is reset.
The structure editor function ^CLEAR also resets the field syntax. Since the structure editor function ^RETRIEVE carries out an implicit ^CLEAR, this also resets field syntax.
Field Syntax Attributes
Code |
Description |
---|---|
NDI
|
Do not display the contents of this
field. Note: NDI is a static property—it can only be set before the ProcScript edit statement is executed. |
NED
|
Do not allow this field to be edited. |
NPR
|
Do not prompt this field. Not available in the web environment. |
HID
|
Hide field. Do not display, edit, or
prompt this field. (Equivalent to NDI , NED , and NPR .)
Not valid in character mode
($GUI = |
DIM
|
Do not allow editing or prompt this
field. In GUI mode, the field is dimmed; in character mode, it is equivalent to NED
and NPR . |
YDI
|
Display this field. |
YED
|
Allow this field to be edited. |
YPR
|
Prompt this field. |
Note: The field syntax codes YDI, YED, and YPR cannot be set declaratively. They can only be set using $fieldsyntax and fieldsyntax.
Using fieldsyntax
The following example sets the field syntax for field DISCOUNT_2 to No Edit and No Prompt, if the value in the field DISCOUNT_1 is not zero:
if (DISCOUNT_1 != 0) fieldsyntax DISCOUNT_2, "NED,NPR" endif