$valrep
Return or set the ValRep used by a widget for a field.
$valrep { (
Field {,
List})
}
$valrep { (
Field)
}
=
List
Example: $valrep(COLORS.THEME) = "R=Red;G=Green;B=Blue"
Parameters
Parameter | Data Type | Description |
---|---|---|
Field | String | Field name; optional; can be a literal
name, a string, or a variable, function, parameter or indirect reference to a field.
Field can optionally contain a qualified field name, for example,
MYFLD.MYENT . If omitted, the current field is used. |
List | String | Associative list that contains the desired ValRep items for the specified field |
Return Values
- ValRep list used by a widget for the specified field.
- Empty string (""), if no ValRep list has been declared or if the field cannot be found.
Use
Allowed in dynamic server pages, forms and reports, and in service components that are not self-contained.
In dynamic server pages, $valrep can only be used once (before $webdefinitions, when the page is initially loaded) to override the declarative ValRep. It cannot be used to dynamically change the ValRep.
Description
$valrep returns or sets the ValRep list for the specified field in all occurrences in the component. The ValRep list set with $valrep:
- Overrides the ValRep list defined for the widget properties dialog box.
- Is reset to the compiled list each time that a component is restarted.(with Keep Data in Memory set off )
- Can be overridden for the field in a single occurrence by using $fieldvalrep.
Setting the ValRep for a Radio Group
The following example sets the ValRep for the
radio group for field GENDER. The underlined semicolon (;
) represents
the Uniface subfield separator (by default, GOLD ;).
$valrep(GENDER.PERSON) = "F=Female;M=Male;N=Not specified"