FieldRepetitions()
Category: Design
Syntax: FieldRepetitions ( fileName; layoutName; fieldName ) |
Parameters:
fileNameThe name of the open file where the field to be referenced is located.
layoutNameThe name of the layout where the field to be referenced is located.
fieldNameThe name of the field for which to return repetition information.
Data type returned: Text
Description:
Returns a space-delimited text string that indicates the number of repetitions and orientation of the field in question. Note that you must pass a layout name. (A table name does not work.) The data is returned in the format of "NumRepetitions Orienation."
The MiddleWords() function can be used to extract either component of the result.
If literal names of objects are used, calls to the function may be broken when file or object names are changed. Functions such as Get(FileName), LayoutNames(), and FieldNames() can be used to dynamically return information about a database. Also remember that only the number of repetitions that appear on the layout are returned, not the number of repetitions defined in Define Database. Use FieldType() to return the number of repetitions specified in Define Database.
Examples:
Function |
Results |
---|---|
FieldRepetitions ( Get ( FileName ); "Invoice_Detail"; "Payment_History" ) |
Might return a string like 10 vertical. |