# Using the Constraints Tab

The Constraints tab of the mapper allows you to constrain or manipulate the relationship between source and target repeating elements.

The following Constraint Type options are available from the Constraints tab:

- Repeatability/Join—To learn more, see Merging the Contents of Repeating Elements and Creating a Conditional Constraint Using the Constraints Tab.
- Union—To learn more, see Using the Union Option of the Constraints Tab.
- Group By Key Fields—To learn more, see Using the Group by Key Fields Option of the Constraints Tab.

When you create structural links between repeating elements in the Design View, XQuery for loops are generated to iterate through the repeating elements. You can use the Where Clause Expression pane of the Constraints tab to limit or constrain the target repeating elements by adding where clauses to the XQuery for loops. In the Where Clause Expression pane of the Constraints tab, you can build complex conditions for the where clause of the XQuery for loop. A complex condition is made up of conditions that are joined together by OR or AND operators, for example:

    ((data($PurchaseOrderDoc/partId) > 200 and data($PurchaseOrderDoc/partId) <= 400))

During run time, the for loop will iterate only over those repeating elements that meet the complex condition. For an example see Adding a Constraint With Multiple Conditions.