---
title: "range · RUAL Documentation"
description: "get a range of elements from a list. Use start 0 and stop -1 to retrieve all items."
canonical: https://docs.rual.nl/block-types/redis/redis_list_range
language: en
---

# range

This block is part of the [`redis`](https://docs.rual.nl/block-types/redis) group and was last modified in core [`v13.0.7`](https://docs.rual.nl/core-versions/130007).

### Redis Key Selection Required

This block relies on a Redis key to perform its redis releated actions. You must manually select the Redis key you want to use in the flow in the blueprint using the Redis key selector modal. To access the modal, click the white button on the block.

get a range of elements from a list. Use start 0 and stop -1 to retrieve all items.

- flow `flow`

- start required `number` the index to start at.

- stop required `number` the index to stop at. can be -1 or -2

- flow `flow`

- elements `array`

- success `condition`

- error `value`

- key `v13.0.7` `value`

| `redis lrange` |
| --- |
| `lrange` |
| `redis lists get` |
| `redis lists retrieve` |
| `redis lists fetch` |
| `redis lists all` |
| `redis lists get all` |
| `get list items` |
| `fetch list items` |

A typical wiring for [range](https://docs.rual.nl/block-types/redis/redis_list_range): [number](https://docs.rual.nl/block-types/number/number_default) feeds the `start` pin; [get guid](https://docs.rual.nl/block-types/users/user_get_guid) feeds the `list` pin; [number](https://docs.rual.nl/block-types/number/number_default) feeds the `stop` pin; the `flow` out pin feeds [get multiple documents (cached)](https://docs.rual.nl/block-types/storage/function_get_documents); the `elements` out pin feeds [foreach](https://docs.rual.nl/block-types/foreach/function_foreach).

![Studio canvas example for the range block: typical wiring for range.](https://docs.rual.nl/canvas-examples/redis_list_range.png)

### Commonly used with

In production blueprints, this block is most often wired together with:

- [number](https://docs.rual.nl/block-types/number/number_default): feeds into this block. Generates a valid number from the filled custom value in the blueprint.

- [get multiple documents (cached)](https://docs.rual.nl/block-types/storage/function_get_documents): this block feeds into it. Get multiple documents from the given storage using the hot document cache. Fetches each document individually. Skips documents that do not exist or are removed.

- [foreach](https://docs.rual.nl/block-types/foreach/function_foreach): this block feeds into it.

- [create](https://docs.rual.nl/block-types/globals/trigger_custom_function): feeds into this block. Creates a new function that can be executed using the given name.

- [get guid](https://docs.rual.nl/block-types/users/user_get_guid): feeds into this block. Returns the guid (field: _meta.guid) of the given user.

- [trim](https://docs.rual.nl/block-types/redis/redis_list_trim): feeds into this block. trim a list to the specified range.

### Version history

Introduced in [`v13.0.7`](https://docs.rual.nl/core-versions/130007).

### Service documentation
