FieldPutAlias Function | |
Set the value of a field identified by its work area alias and field name.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.21
Syntax FUNCTION FieldPutAlias(
symAlias AS SYMBOL,
symField AS SYMBOL,
uNewValue AS USUAL
) AS USUAL
public static Usual FieldPutAlias(
Symbol symAlias,
Symbol symField,
Usual uNewValue
)
Request Example
View SourceParameters
- symAlias
- Type: Symbol
The alias of the work area in which symField is located.
- symField
- Type: Symbol
The field name. - uNewValue
- Type: Usual
The value to assign to the field.
The data type of this expression must match the data type of the field.
Return Value
Type:
Usual
The value assigned to the field.
If
symField does not correspond to any field in the work area specified by
symAlias, FieldPutAlias() returns NIL.
Remarks
This function 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.
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.
Examples
This example uses FieldPutAlias() to set field values in two different work areas:
1USE region1 NEW
2USE region2 NEW
3FieldPutAlias(#REGION1, #FNAME, "Kate")
4FieldPutAlias(#REGION2, #FNAME, "Cindy")
See Also