Retrieving a Specific Answer from a List

At times, you may need to retrieve a specific answer from a list of answers. For example, maybe you have created a list of employees, but later in the document you need to merge the name of just the second employee in the list. You can do this by using explicit indexing. Type the index number of the answer you need between brackets, just after the variable name, to merge only that list item.

To use explicit indexing

  1. Insert the variable whose value you want to retrieve into the template text. (Make sure you have repeated the variable someplace earlier in the template.)
  2. Once you have inserted the variable, place your cursor immediately after the variable name and type—between brackets—the index number of the repetition you want to retrieve. Make sure this index is before any additional field formatting notations, for example:

The second alternate will be «Alternate Board Member[2]:LIKE THIS».

To set an explicit index for a variable in a form field, first create the variable. Then select the field and open the Field Properties dialog box. Enter the explicit index in the Variable field, immediately after the variable name (like in the example above).

Normally, you must position a repeated variable inside a REPEAT instruction, but when you a specify a particular list entry this way, the REPEAT instruction should not be included.

The Maximum WHILE iterations limit controls the maximum-allowed explicit index. (You set this value at the Component File Properties dialog box.)