Accessing data in the next row of a repeat (Next.)

As a general rule, you can only access the value of fields that are within the relevant row of a repeat.

For example, if you have Repeat1_rpt that contains Field1_txt, when you assemble the template, the value of Field1_txt gets inserted in each row of the Repeat1_rpt.

You can access the next value of Field1_txt in a Repeat1_rpt row by using the Next. function. You add the Next. to the beginning of the field that you are accessing, e.g. Next.Field1_txt would return the value of Field1_txt for the next row of Repeat1_rpt.

You can also use the Next.Field1_txt value in a conditional IF statement, e.g. { MERGEFIELD IfStart:1 Next.Field1_txt <> ” } would return true if Field1_txt was not blank, i.e. there was some text within the¬†field.

The attached MS Word document includes several examples: the-next-function_assemblywithdifferentlevels