---
title: SLICE_ARRAY
url: https://www.tines.com/docs/formulas/functions/slice-array/
kind: formula-function
---

*[tines.com](https://www.tines.com/llms.txt) › [Docs](https://www.tines.com/docs/llms.txt) › [Formulas](https://www.tines.com/llm/docs/formulas.md) › [Functions](https://www.tines.com/llm/docs/formulas/functions.md)*

# SLICE_ARRAY

*[View on tines.com](https://www.tines.com/docs/formulas/functions/slice-array/)*

Returns the remainder of the array (or `length` elements of the array, if specified), beginning at the `start_index`.

**Categories:** Arrays

## Syntax

```
SLICE_ARRAY(array, start_index, [length])
```

## Examples

### Example 1

Input:

```json
{
  "my_action": {
    "message": [
      "north",
      "south",
      "east",
      "west"
    ]
  }
}
```

Formula:

```
SLICE_ARRAY(my_action.message, 2)
```

Output:

```json
[
  "east",
  "west"
]
```

### Example 2

Input:

```json
{
  "my_action": {
    "message": [
      "north",
      "south",
      "east",
      "west"
    ]
  }
}
```

Formula:

```
SLICE_ARRAY(my_action.message, 1, 2)
```

Output:

```json
[
  "south",
  "east"
]
```

### Example 3: If `length` extends past the end of the array, it returns only the remainder of the array:

Input:

```json
{
  "my_action": {
    "message": [
      "north",
      "south",
      "east",
      "west"
    ]
  }
}
```

Formula:

```
SLICE_ARRAY(my_action.message, 1, 50)
```

Output:

```json
[
  "south",
  "east",
  "west"
]
```

## Sample actions

```json
{
  "standardLibVersion": "14",
  "actionRuntimeVersion": "3",
  "agents": [
    {
      "disabled": false,
      "name": "My Action",
      "description": "",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "message": [
            "north",
            "south",
            "east",
            "west"
          ]
        }
      },
      "position": {
        "x": 1845,
        "y": 5070
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    },
    {
      "disabled": false,
      "name": "SLICE_ARRAY",
      "description": "",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "slice_array": "=SLICE_ARRAY(my_action.message, 2)"
        }
      },
      "position": {
        "x": 1695,
        "y": 5175
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    },
    {
      "disabled": false,
      "name": "SLICE_ARRAY",
      "description": "",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "slice_array": "=SLICE_ARRAY(my_action.message, 1, 2)"
        }
      },
      "position": {
        "x": 1845,
        "y": 5175
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    },
    {
      "disabled": false,
      "name": "SLICE_ARRAY",
      "description": "",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "slice_array": "=SLICE_ARRAY(my_action.message, 1, 50)"
        }
      },
      "position": {
        "x": 1995,
        "y": 5175
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    }
  ],
  "links": [
    {
      "sourceIdentifier": 0,
      "receiverIdentifier": 1
    },
    {
      "sourceIdentifier": 0,
      "receiverIdentifier": 2
    },
    {
      "sourceIdentifier": 0,
      "receiverIdentifier": 3
    }
  ],
  "diagramNotes": []
}
```
