Set the value of a field identified by its work area alias and field name.
XSharp.RT (in XSharp.RT.dll) Version: 2.08
Syntax View Source
symAlias AS SYMBOL,
symField AS SYMBOL,
uNewValue AS USUAL
) AS USUAL
public static Usual FieldPutAlias(
- Type: Symbol
The alias of the work area in which <symField> is located.
- Type: Symbol
The field name.
- Type: Usual
The value to assign to the field. The data type of this expression must match the data type of the field.
The value assigned to the field. If <symField> does not correspond to any field in the work area specified by <symAlias>, FieldPutAlias() returns NIL.
FieldPutAlias() allows you to set the value of a field using a symbol that specifies the field name. Within generic database service functions, this allows the setting of field values without the use of the macro operator, among other things.
By default, this function operates on the currently selected work area, as shown in the example below. It can be made to operate on an unselected work area by specifying it within an aliased expression.
Shared mode: For a shared database, this function requires a record lock. Refer to the "Concurrency Control" chapter in the Programmer's Guide for more information on locking.
This example uses FieldPutAlias() to set field values in two different work areas:
USE region1 NEW
USE region2 NEW
FieldPutAlias(#REGION1, #FNAME, "Kate")
FieldPutAlias(#REGION2, #FNAME, "Cindy")