# Index

This is useful to find the position of an item in a comma separated list (or other separator). The first argument (aka parameter) is the string of text you are looking for. The second argument is the delimiter that separates the list of items. &#x20;

Counting starts from 1 and zero is returned if the item is not found in the list.&#x20;

{% hint style="warning" %}
Note that an **exact match** is required e.g. text case and spaces
{% endhint %}

<table><thead><tr><th>Expression</th><th>Databox Value</th><th width="90">Result</th></tr></thead><tbody><tr><td><code>Index(" line2", ",")</code></td><td>line1, line2, line3</td><td>2</td></tr><tr><td><code>Index("red", "/")</code></td><td>Blue, Red, Green</td><td>0</td></tr></tbody></table>

To avoid mistakes with mixed case, this will switch the Databox contents to upper case and then look for "RED"

<table><thead><tr><th width="298">Expression</th><th>Databox Value</th><th width="90">Result</th></tr></thead><tbody><tr><td><code>Upper Index("RED", "/")</code></td><td>Blue/Red/Green</td><td>2</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.keyfax.biz/product-suite/admin/databox-expressions/text-expressions/index.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
