GetNthRecord()

Category: Logical

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.


: FileMaker Specifications

FileMaker 8 Product Line

Specifications and Storage Limits

Field Types and Import/Export Formats

: Calculation Functions

Working with Calculations Primer

Calculation Signatures

Calculation Functions

: Custom Functions

Custom Functions Primer

Useful Custom Functions

: Script Steps

Scripting Primer

Script Step Reference

: Quick Reference

FileMaker Error Codes

FileMaker Keyboard Shortcuts

FileMaker Network Ports

FileMaker Server Command Line Reference

FileMaker XML Reference

: Other Resources

Where to Go for More Information



FileMaker 8 Functions and Scripts Desk Reference
FileMaker 8 Functions and Scripts Desk Reference
ISBN: 0789735113
EAN: 2147483647
Year: 2004
Pages: 352

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net