Properties of Repeatable Fields

There are three properties of repeatable fields and one property of repeating number fields that can be used in calculations (within a number field). 

  • For more information on number fields, click here.
  • For an overview of calculations, including using a number field to perform a calculation, click here.

These properties can be accessed from either within the repeatable section or in any subsequent section (repeatable or otherwise).

The four properties available are as follows:

@123 is a generic field reference code for any field within a repeatable section

  1. @123.RepeatCount
  2. @123.MinRepeats
  3. @123.MaxRepeats
  4. @123.RepeatSum

For properties 1 to 4, @123 can be any field within the repeatable section as every field will return the same value (as they are properties of the section). RepeatSum is a property of a number field within a repeatable section and as such, @123 in this context must be a number field.

Additionally, the value of these properties will be the same in all repetitions (if the calculation is performed within the repeatable section) as well as if the calculation is performed in any section that follows the repeatable section.

The Repeat variable

In addition to the above repeating field properties, Repeat returns the repetition number of the repeatable section where the property is requested, starting at 1 for the first repetition and incrementing by 1 for each subsequent repetition, up to a maximum of @123.RepeatCount (see below)

@123.RepeatCount

@123.RepeatCount returns the total number of (instantiated) repetitions in the repeatable section. The minimum value of @123.RepeatCount is 1, but may be larger where the "Minimum Number Of Repetitions" (below) is greater than 1. Each time you "ADD ANOTHER", the RepeatCount increases by 1. "REMOVING" a repetition decreased the RepeatCount by 1.

 

 

@123.MinRepeats and @123.MaxRepeats

Returns the minimum/maximum number of repetitions specified in a repeatable section’s properties in the form builder ("Minimum/Maximum Number Of Repetitions" below).


 

@123.RepeatSum

This property returns the sum of all the values of a repeating field.  As this is a numerical property, it can only be used on repeating number fields.  For example, if @123~1 has a value of 27, @123~2 has a value of -91 and @123~3 has a value of 161 then, assuming these are the only three instantiated repetitions, @123.RepeatSum = 27 -91 +161 = 97