Modern mode and legacy mode are two differing rulesets for loops to determine if an attribute's question should appear looped in the DQ. This depends on where the multiple instances of the attribute exist, such as outside the loop, in another loop, in a condition, in an operation, etc.
Choosing between the modes exist as a template-level setting. The setting can be accessed in the Advanced page in your template's left sidebar, at the bottom of the General tab. These are boxed in red in the screenshot below.
The difference between the two modes:
Modern mode provides a more predictable and logical framework for loops. The general rule is that separate loops containing the same attributes need to be linked for them to appear looped in the DQ. Please refer to the tables in the next section for exceptions.
Legacy mode is for older templates that must preserve legacy loop rules to work as intended. It is the result of a more piecemeal approach to make various combinations work.
Below is a non-exhaustive list of how each mode operates in specific automation situations.
Placeholders only
Situation | Modern | Legacy |
Attribute in placeholder in one loop | Looped | Looped |
Attribute in placeholder in two unlinked loops | Unlooped | Looped |
Attribute in placeholder in two linked loops | Looped | Looped |
Attribute in placeholder in loop and outside loop | Unlooped | Unlooped |
Placeholders and conditions
Situation | Modern | Legacy |
Attribute in placeholder and condition in one loop | Looped | Looped |
Attribute in placeholder in one loop and in condition in unlinked loop | Unlooped | Looped |
Attribute in placeholder in one loop and in condition in linked loop | Looped | Looped |
Above case but condition uses Present/Contains | Looped | Looped |
Attribute in placeholder in loop and in condition outside loop | Unlooped | Looped |
Above case but condition uses Present/Contains | Looped | Looped |
Placeholders and operations
Situation | Modern | Legacy |
Attribute in placeholder and operation in one loop | Looped | Looped |
Attribute in placeholder in one loop and in operation in unlinked loop | Looped | Looped |
Attribute in placeholder in one loop and in operation in linked loop | Looped | Looped |
Attribute in placeholder in loop and in operation outside loop | Looped | Looped |
Conditions only
Situation | Modern | Legacy |
Attribute in condition in one loop | Looped | Looped |
Attribute in condition in one loop and in another condition in unlinked loop | Unlooped | Looped |
Attribute in condition in one loop and in another condition in linked loop | Looped | Looped |
Attribute in condition in loop and in another condition outside loop | Unlooped | Unlooped |
Conditions and operations
Situation | Modern | Legacy |
Attribute in condition and in operation in one loop | Looped | Looped |
Attribute in condition in one loop and in operation in unlinked loop | Looped | Looped |
Attribute in condition in one loop and in operation in linked loop | Looped | Looped |
Attribute in condition in loop and in operation outside loop | Looped | Looped |
Operations only
Situation | Modern | Legacy |
Attribute in operation in one loop | Looped | Looped |
Attribute in operation in one loop and in another operation in unlinked loop | Unlooped | Looped |
Attribute in operation in one loop and in another operation in linked loop | Looped | Looped |
Attribute in operation in loop and in another operation outside loop | Unlooped | Looped |
Placeholders, operations and conditions
Situation | Modern | Legacy |
Attribute in placeholder, operation and condition in one loop | Unlooped | Looped |
Attribute in placeholder and operation in one loop, condition outside loop | Unlooped | Looped |
Attribute in placeholder and condition in one loop, operation outside loop | Unlooped | Looped |
Attribute in operation and placeholder in one loop, condition outside loop | Unlooped | Unlooped |