Get(CalculationRepetitionNumber)
Returns a number representing the repetition of the calculation field being calculated.
Format
Get ( CalculationRepetitionNumber )
Parameters
None
Data type returned
number
Originated in version
7.0
Description
The first repetition returned is 1. If the current field isn't a repeating field, the function returns 1.
Example 1
Returns 5 when FileMaker Pro is calculating the fifth repetition of a repeating field.
Example 2
As the field definition for Quiz::WeightedScore (a calculation field with five repetitions), this formula weights each quiz score by its position in the series based on the contents of Quiz::Score (a number field with five repetitions):
Quiz::Score * Get ( CalculationRepetitionNumber )
When Quiz::Score contains 85, 90, 78, 92, and 88 in repetitions 1 through 5:
-
Quiz::WeightedScore[1] returns 85
-
Quiz::WeightedScore[2] returns 180
-
Quiz::WeightedScore[3] returns 234
-
Quiz::WeightedScore[4] returns 368
-
Quiz::WeightedScore[5] returns 440
Example 3
As the field definition for Timer::Reminder (a calculation field with five repetitions), this formula calculates future times based on the contents of Timer::Start Time (a time field) and Timer::Snooze Minutes (a number field):
Time ( Hour ( Extend ( Timer::Start Time ) ) ; Minute ( Extend ( Timer::Start Time ) ) + ( Extend ( Timer::Snooze Minutes ) * Get ( CalculationRepetitionNumber ) ) ; Seconds ( Extend ( Timer::Start Time ) ) )
In this example, the Extend function allows a non-repeating field to be used in every repetition of a repeating field.
When Timer::Start Time contains "12:00:00" and Timer::Snooze Minutes contains "6":
-
Timer::Reminder[1] returns 12:06:00
-
Timer::Reminder[2] returns 12:12:00
-
Timer::Reminder[3] returns 12:18:00
-
Timer::Reminder[4] returns 12:24:00
-
Timer::Reminder[5] returns 12:30:00