Skip to main content

Modern and legacy modes for loops

Finding the appropriate loop ruleset

Updated this week

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

image25.png, Picture

Looped

Looped

Attribute in placeholder in two unlinked loops

image10.png, Picture

Unlooped

Looped

Attribute in placeholder in two linked loops

image21.png, Picture

Looped

Looped

Attribute in placeholder in loop and outside loop

image19.png, Picture

Unlooped

Unlooped

Placeholders and conditions

Situation

Modern

Legacy

Attribute in placeholder and condition in one loop

image22.png, Picture

Looped

Looped

Attribute in placeholder in one loop and in condition in unlinked loop

image3.png, Picture

Unlooped

Looped

Attribute in placeholder in one loop and in condition in linked loop

image9.png, Picture

Looped

Looped

Above case but condition uses Present/Contains

Looped

Looped

Attribute in placeholder in loop and in condition outside loop

image12.png, Picture

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

image4.png, Picture

Looped

Looped

Attribute in placeholder in one loop and in operation in unlinked loop

image5.png, Picture

Looped

Looped

Attribute in placeholder in one loop and in operation in linked loop

image23.png, Picture

Looped

Looped

Attribute in placeholder in loop and in operation outside loop

image7.png, Picture

Looped

Looped

Conditions only

Situation

Modern

Legacy

Attribute in condition in one loop

image26.png, Picture

​​Looped​

​​Looped​

Attribute in condition in one loop and in another condition in unlinked loop

image24.png, Picture

​​Unlooped​

​​Looped​

Attribute in condition in one loop and in another condition in linked loop

image16.png, Picture

​​Looped​

​​Looped​

Attribute in condition in loop and in another condition outside loop

image11.png, Picture

Unlooped​

Unlooped​

Conditions and operations

Situation

Modern

Legacy

Attribute in condition and in operation in one loop

image8.png, Picture

Looped

Looped

Attribute in condition in one loop and in operation in unlinked loop

image17.png, Picture

Looped

Looped

Attribute in condition in one loop and in operation in linked loop

image18.png, Picture

Looped

Looped

Attribute in condition in loop and in operation outside loop

image2.png, Picture

Looped

Looped

Operations only

Situation

Modern

Legacy

Attribute in operation in one loop

image6.png, Picture

Looped

Looped

Attribute in operation in one loop and in another operation in unlinked loop

image13.png, Picture

Unlooped

Looped

Attribute in operation in one loop and in another operation in linked loop

image20.png, Picture

Looped

Looped

Attribute in operation in loop and in another operation outside loop

image27.png, Picture

Unlooped

Looped

Placeholders, operations and conditions

Situation

Modern

Legacy

Attribute in placeholder, operation and condition in one loop

image28.png, Picture

Unlooped

Looped

Attribute in placeholder and operation in one loop, condition outside loop

image14.png, Picture

Unlooped

Looped

Attribute in placeholder and condition in one loop, operation outside loop

image1.png, Picture

Unlooped

Looped

Attribute in operation and placeholder in one loop, condition outside loop

image15.png, Picture

Unlooped

Unlooped

Did this answer your question?