GetField()


Returns the field value of the specified database field.

Syntax

GetField(<cName>, [<cTable>]) --> xField

Arguments

<cName> --> is the name of the field to retrieve.

<cTable> --> is the name of the table to retrieve the field information from.

Returns

Returns the field value of <cName>.

Description

This function returns the field value of the field name specified by <cName>. It is assumed that the database has been opened and is currently selected. You cannot always rely on a database to be selected so it is recommended to specify the database name as an alias when using GetField(). See the examples below.

Example

The following statement assumes that the database Supplier.dbf has been opened:

Supplier->(GetField('Name'))

The contents of the supplier field "Name" is returned. Note that Supplier->( ... ) forces the Supplier database to be temporarily selected. The next statement assumes the stock.dbf table has been opened by the form. It retrieves the product location.

Stock->(GetField('Location'))

____________________________

Related Topics:

Business Function List

Write()



CAPITAL VISUAL BUILDER