Available in: Axsy Mobile for Salesforce, Axsy Field Service, Axsy Public Sector, Axsy Retail Execution

In addition to configuring mappings for the individual fields of the record running the Smart Form, you can also loop through information on items in the Related List of the running record. As an example, Work Order Line Item is a Related List on the Work Order object, and you can have more than one Work Order Line Item per Work Order. Loops allow you to iterate through a Work Order's Work Order Line Item records, accessing the fields you choose for each record. 

NOTE: You can create your own Related List object, but in this case Work Order Line Item will be the example as it is a Standard object. 

Create a Loop Element 

Create a Loop Element that encapsulates Elements that will map to the fields you want to access for each Work Order Line Item record.

For more information on configuring Loop Elements in the Designer, please see this article for details: Configuring Loops

Navigate to the Mapping tab of the Loop's Element Edit Properties Window and define Data Mapping.

Field MappingReferences the Related Object's API Name. Please see here for more information: Using the Mapping Lookup Tool
Data ActionFor more information, please see: Loop Mapping Data Actions
Relationship Field nameAPI Name of the field that relates Work Order Line Item to Work Order as shown below (Master-Detail or Lookup relationship)

Optionally, you can also configure SOQL statements to filter the results of the Loop and set the order by which the Related List records should be iterated through. For more information on Salesforce's Object Query Language, please see this article: Salesforce Object Query Language (SOQL)

Example: Here, only Work Order Line Items with the Status 'New' will be looped through, and the Work Order Line Items will loop through in numerical order ascending.

NOTE: In the above example Status record information needs to be available for the above query to function. This is most easily achieved by having an Text Element field mapped to the Status field within the body of the Loop.