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) )