> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# Continue Each

- Component: `appmixer.utils.controls.ContinueEach`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.utils.controls 1.14.7](https://connectors.appmixer.com/connector/appmixer.utils.controls/1.14.7.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.utils.controls/1.14.7/component/appmixer.utils.controls.ContinueEach>

Ends one pass of a sequential Each loop. Place it after the last step that has to finish before the next item starts: it tells the Each component (with 'Sequential' turned on) that the current item is done, so Each sends the next one. This keeps the items in order even when the steps in the loop take a varying amount of time. Optionally add named values to the result - Each emits one entry per item as 'Result' on its 'done' port once the loop is over.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Correlation ID (`correlationId`) | text | Select the 'Correlation ID' variable of the Each component whose loop this component ends. It identifies the loop, so nested Each loops each need their own Continue Each. |
| Index (`index`) | number | Select the 'Index' variable of the same Each component. It identifies the item that is done, so a repeated or late confirmation of another item is ignored. |
| Add to Result (`result`) | expression | Named values to collect from this item, for example the ID of a record created in the loop. Every item adds one entry to the 'Result' list that the Each component emits on its 'done' port once all items are processed, in item order: an object with one field per row, e.g. {"id": "1001", "status": "created"}. A value that is empty for an item is added as null. An item skipped after 'Item Timeout' is null as a whole. Leave empty if you do not need to collect anything. |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| Correlation ID (`correlationId`) | string | - |
| Index (`index`) | integer | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.utils.controls.ContinueEach",
  "author": "Appmixer <info@appmixer.ai>",
  "label": "Continue Each",
  "description": "Ends one pass of a sequential Each loop. Place it after the last step that has to finish before the next item starts: it tells the Each component (with 'Sequential' turned on) that the current item is done, so Each sends the next one. This keeps the items in order even when the steps in the loop take a varying amount of time. Optionally add named values to the result - Each emits one entry per item as 'Result' on its 'done' port once the loop is over.",
  "version": "1.0.0",
  "private": false,
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string"
          },
          "index": {
            "type": "integer",
            "minimum": 0
          },
          "result": {
            "type": "object"
          }
        },
        "required": [
          "correlationId",
          "index"
        ]
      },
      "inspector": {
        "inputs": {
          "correlationId": {
            "type": "text",
            "label": "Correlation ID",
            "index": 1,
            "tooltip": "Select the 'Correlation ID' variable of the Each component whose loop this component ends. It identifies the loop, so nested Each loops each need their own Continue Each."
          },
          "index": {
            "type": "number",
            "label": "Index",
            "index": 2,
            "min": 0,
            "tooltip": "Select the 'Index' variable of the same Each component. It identifies the item that is done, so a repeated or late confirmation of another item is ignored."
          },
          "result": {
            "type": "expression",
            "label": "Add to Result",
            "index": 3,
            "levels": [
              "ADD"
            ],
            "tooltip": "Named values to collect from this item, for example the ID of a record created in the loop. Every item adds one entry to the 'Result' list that the Each component emits on its 'done' port once all items are processed, in item order: an object with one field per row, e.g. {\"id\": \"1001\", \"status\": \"created\"}. A value that is empty for an item is added as null. An item skipped after 'Item Timeout' is null as a whole. Leave empty if you do not need to collect anything.",
            "fields": {
              "name": {
                "type": "text",
                "label": "Name",
                "index": 1,
                "tooltip": "The name of the field in the result entry, e.g. 'id'."
              },
              "value": {
                "type": "text",
                "label": "Value",
                "index": 2,
                "tooltip": "The value of the field. Usually a variable of a step inside the loop."
              }
            }
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "schema": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string",
            "title": "Correlation ID",
            "example": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
          },
          "index": {
            "type": "integer",
            "title": "Index",
            "example": 2
          }
        }
      }
    }
  ],
  "icon": "(data URI omitted)"
}
```
