GetNthRecord()
Syntax: GetNthRecord ( fieldName; recordNumber ) |
Parameters:
fieldNameAny related field or repeating field, or an expression that returns a field or a repeating field.
recordNumberAn integer representing the record number from which you want data.
Data type returned: Text, Number, Date, Time, Timestamp, Container
Description:
Returns the contents of fieldName from the provided recordNumber.
Note that the rules governing storage and indexing for related calculation values apply to GetNthRecord() just as they do for other functions: The result of an expression containing GetNthRecord() will not update when a related value is referenced unless it is set to be an unstored calculation or unless the relationship is reset/refreshed somehow.
Examples:
Function |
Results |
---|---|
GetNthRecord( First Name; 2 ) |
Returns the contents of the First Name field for record 2 in the current table. |
GetNthRecord( First Name; Get(RecordNumber)+ 1 ) |
Returns the contents of the First Name field for the next record in the current table. Using this technique, you might set a tool tip to show the next and previous names in a found set. |
GetNthRecord( Contacts::First Name; 2 ) |
Returns the contents of the First Name field for record 2 in the Contacts table. |
GetNthRecord( Contacts::Phone[2]; 2 ) |
Returns the contents of the second repetition of the Phone field for record 2 in the Contacts table. |