RepeatCounter Function
Description:
The innermost repeat counter of the full repeat context at the point in the template where the function occurs.
Note that the repeat counter is always returned as a text value, even when the repeat span is a whole number.
Also, Note that brackets are not used for this special function.
Returns:
Text
Examples:
Expression | Result |
[ Repeat 1 {RepeatCounter}] | "1" |
[ Repeat 2 [Repeat 3 {RepeatCounter}]] | One of the following: "1" "2" "3" |
[ Repeat List("a","b","c") {RepeatCounter}] | One of the following: "a" "b" "c" |
This is most often used in prompts or guidance on the questionnaire:
"Enter the name of the {RepeatCounter Format "nth"} Borrower"
As in the 3rd example above, if the repeat context is another variable, the RepeatCounter will be the instances (values) of that variable:
[
Repeat ProjectPersonnel
{RepeatCounter} will be {ProjectRole} for this project.]