GetField()
Category: Logical
Syntax: GetField ( fieldName ) |
Parameters:
fieldNameA text string, or field or expression that returns a text string, which contains the name of a field.
Data type returned: Text, Number, Date, Time, Timestamp, Container
Description:
Returns the contents of the fieldName field.
Essentially, GetField() provides a level of abstraction when retrieving the contents of a field. Instead of saying "Give me the value of the FirstName field," for instance, it's like saying "Give me the value of the field whose name is in the gWhatField field." By putting a different field name in the gWhatField field, you can retrieve the contents of a different field.
The Evaluate() function can always be used in place of the GetField(). In this example, for instance, Evaluate (gSelectColumn) and GetField (gSelectColumn) both return the same result. The opposite is not true, however. Evaluate() can perform complex evaluations and can have trigger conditions defined, whereas GetField() can retrieve only the contents of a field.
Examples:
Function |
Results |
---|---|
GetField ("myField") |
Returns the contents of myField. |
GetField (myField) |
Returns the contents of FirstName, when myField contains the string "FirstName". |
GetField (MiddleValues (fieldList; counter ;1)) |
Returns the contents of the LastName field, when fieldList is a return-delimited list of field names containing "FirstName¶LastName¶City¶State¶Zip" and counter is 2. |