$fieldvideo
Return or set the video attributes of the specified field.
$fieldvideo { (
Field)} =
AttributeList
AttributeList =
$fieldvideo { (
Field)
}
Parameters
Parameter | Data Type | Description |
---|---|---|
Field |
String |
Name of the field where the video properties are set. If omitted, the current field is used. |
AttributeList |
String |
Uniface list of one or more video
attributes; valid values are:
If omitted, DEF is assumed. |
Video attributes
Attribute Code | Description |
---|---|
BLI
|
Blinking |
BOR
|
Border |
BRI
|
Bright |
HLT
|
Use system highlight color. Note: This attribute always takes precedence over other video attributes that may be specified. |
INV
|
Inverse |
UND
|
Underline |
COL= n
|
Set color to color code n, the sum of the color numbers for foreground and background. |
Return Values
None.
Use
Use in Form and Report components.
Description
You can use $fieldvideo to dynamically set the video attributes of Field for the current occurrence. You can use color coding to highlight dangerous or slow choices, or to highlight fields which contain data that requires urgent processing.
To set the video properties as data is read, place the $fieldvideo statement for the field after the read statement in the Read trigger.
The structure editor function ^CLEAR also resets the field video attributes. Since the structure editor function ^RETRIEVE carries out an implicit ^CLEAR, this also resets field video attributes.
Note: By default, video attributes that are set with
$fieldvideo override the attributes set by $ACTIVE_FIELD. To
have $ACTIVE_FIELD take precedence over $fieldvideo, set the
$ACTIVE_FIELD_FIRST assignment setting to true
.
Using $fieldvideo
The following example loops through all the occurrences to find whether the name the user entered exists. If it does not, the $fieldvideo function is used to highlight the incorrect name. F2. E1 is a character string field containing a name.
; field : NAMEDUMMY.E1 trigger Detail if (F2.E1 != NAMEDUMMY) $curOcc$ = $curocc $name$ = NAMEDUMMY $counter$ = 1 repeat setocc "E1",$counter$ $counter$ = ($counter$ + 1) until ((F2.E1 = $name$) | ($status < 0)) if ($status < 0) message "%%$name$ not available." setocc "E1",$curOcc$ $fieldvideo (NAMEDUMMY) = "BRI;UND;BLI" $prompt = NAMEDUMMY.E1 return (0) endif endif $prompt = F2.E2 end ; Detail
Version | Change |
---|---|
9.1.01 | Introduced |