FieldComment()

Category: Design

Syntax: FieldComment ( fileName; fieldName )

Parameters:

fileNameThe name of the open file where the field is located.

fieldNameThe name of the field for which to return comments.

Data type returned: Text

Description:

Returns the contents of any comment that has been entered in Define Database for the specified field. The syntax Table::fieldName is required to reference fields outside of the current table context. (The safest approach is to use this method in all cases.)

FieldComment() is useful for documenting a database. Care must be taken, however, because literal references to fields can be broken when file, table, or field names are changed. FieldNames() and TableNames() can be used to dynamically investigate all field names and load the results from FieldComment() into tables for browsing.

A field comment may contain a maximum of 30,000 characters, though it's doubtful such a large comment would constitute a sound development practice.

Examples:

Function

Results

FieldComment ( "myDatabase"; "Contacts::FirstName")

Returns the comment, if any, for the FirstName field as it appears in the table definition.

Категории