GetNthRecord

Returns the contents of a field from the specified record number.

Format 

GetNthRecord ( field ; recordNumber )

Parameters 

field - any related field or repeating field, or an expression that returns a field or a repeating field

recordNumber - the record number from which you want data

Data type returned 

text, number, date, time, timestamp, container

Originated in version 

8.0

Description 

The result of GetNthRecord() will not be updated when the record referred to by GetNthRecord() is a record other than the one in which the calculation is currently being evaluated.

GetNthRecord of the current table returns the Nth record of the found set according to how the current table is sorted.

GetNthRecord of a related table returns the Nth record of the related set (relative to the current record), based on the sort order of the relationship.

Example 1 

GetNthRecord(First Name;2) returns the contents of the First Name field for record 2 in the current table.

Example 2 

GetNthRecord(First Name;Get(RecordNumber)+ 1) returns the contents of the First Name field for the next record in the current table.

Example 3 

GetNthRecord(Contacts::First Name;2) returns the contents of the First Name field for record 2 in the Contacts table.

Example 4 

GetNthRecord(Contacts::Has Repetitions[2];2) returns the contents of the second repetition of the Has Repetitions field for record 2 in the Contacts table.