A field selection loop is a template file construct which allows you to iterate through the collection of selection values that are associated with a repository field definition. In order to use a field selection loop you must be processing a repository structure, either directly via the –s command line option, or because the structure is referenced by the UI Toolkit input window that you are processing via the –w command line option.
Field selection loops are delimited by a matching pair of <SELECTION_LOOP> and </SELECTION_LOOP> tags, which surround the template code to be inserted for each selection list.
Field selection loop tokens are tokens that can only be used within a field selection loop:
There are two types of field selection loop.
Multi-line Field Selection Loops
Multi-line field selection loops occur when the opening and closing loop tags appear on separate lines in a template file, and delimit one or more entire lines of template code, like this:
Multi-line field selection loops generate one or more lines of output code for each key that is processed.
In-line Field Selection Loops
In-line field selection loops exist when the opening and closing loop tags appear on the same line in a template file, and delimit part of a line of template code, like this:
[code] <SELECTION_LOOP> code </SELECTION_LOOP> [code]
In-line field selection loops generate code into the current output line only.
The code between the opening and closing tags of the loop is repeated for each field selection list entry in the field being processed.
The code within a field selection loop can contain generic tokens, structure tokens and special field selection loop tokens, which are discussed later. Most field loop tokens can also be used inside a field selection loop.
Field selection loop tokens can only be used inside a field selection loop, and a field selection loop can only be declared within the context of a field loop.
Copyright © 2018 Synergex International, Inc.