GetRepetition()

Category: Repeating

Syntax: Getrepetition ( repeatingField; repetitionNumber )

Parameters:

repeatingFieldAny repeating field, or an expression that returns a reference to a repeating field.

repetitionNumberA positive integer representing the repetition number to retrieve.

Data type returned: Text, Number, Date, Time, Timestamp, Container

Description:

Returns the contents of the specified repetition of a repeating field.

A shorthand notation can be used in place of the Getrepetition() function. The repetition number can be placed in square brackets after the name of the repeating field. For instance, Getrepetition (myField; 6) is the same as myField[6].

Examples:

Function

Results

Getrepetition (RepPercentage; 2)

Returns the contents of the second repetition of the RepPercentage field.

If you had a repeating text field called QuoteOfTheDay that contained 20 repetitions, you could extract a random quote using the following formula:

 Let (repNumber = Ceiling (Random * 20) ;
 GetRepetition (QuoteOfTheDay; repNumber)
 )


: 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