> For the complete documentation index, see [llms.txt](https://glyue.docs.sandboxbanking.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://glyue.docs.sandboxbanking.com/reference/special_variables/iterables/sritem-sridx.md).

# sritem/sridx

Provides access to the value (`sritem`) and index (`sridx`) when calling a [service request](/reference/integration_components/servicerequest.md) multiple times using the [`call_for_each`](/reference/integration_components/servicerequest.md#call_for_each) column.

These variables are only populated when the `call_for_each` column is set, and are only accessible in the service request's lifecycle hooks and in all columns on its [field mappings](/reference/integration_components/field-mapping.md). They are usually used to configure field mappings when calling a service request repeatedly.

{% hint style="info" %}
Read more about the `call_for_each` column [here](/reference/integration_components/servicerequest.md#call_for_each).
{% endhint %}

```
# Given
call_for_each = ["abc@email.com", "def@email.com", "ghi@email.com"]

# First iteration
fitem ==> "abc@email.com"
fidx ==> 0

# Second iteration
fitem ==> "def@email.com"
fidx ==> 1

etc...
```

**Example usage**

```
# Given
call_for_each = [
    {"name": "Sally", "email": "sally@email.com"},
    {"name": "Benjamin", "email": "benjamin@email.com"},
    {"name": "David", "email": "david@email.com"}
]

# To send an email to each individual, set the following on the service request's field mapping
field: email_address
value: sritem.email

```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://glyue.docs.sandboxbanking.com/reference/special_variables/iterables/sritem-sridx.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
