---
title: ArmaRAMDb - List Load
icon: mdi:file-text-outline
excerpt: Get all elements of a list stored at a key from RAMDb.
---

# ramdb_db_fnc_listLoad

## Description

Retrieves all elements of a list stored at a specified key from the RAMDb database. This function is useful when you need to access the complete list data rather than individual elements, allowing operations on the entire dataset. The retrieved data is passed to a callback function for processing.

## Syntax

```sqf
[_key, _function, _call, _netId] call ramdb_db_fnc_listLoad
```

## Parameters

| Parameter | Type | Description | Default |
|-----------|------|-------------|---------|
| _key | String | The key identifying the list to be retrieved | "" |
| _function | String | The name of the function that will receive the retrieved data | "" |
| _call | Boolean | Whether to call the function in an unscheduled environment | false |
| _netId | String | The NetID of the target to return data from the function (multiplayer only) | "" |

## Return Value

No value is returned directly. The retrieved list data is passed to the specified callback function asynchronously.

## Examples

**Retrieve all event logs:**
```sqf
["events", "myProject_fnc_processEventLogs"] call ramdb_db_fnc_listLoad;
```

**Retrieve a player list with synchronous callback:**
```sqf
["playerList", "myProject_fnc_processPlayerList", true] call ramdb_db_fnc_listLoad;
```

**Send mission data to a specific client:**
```sqf
["missionData", "myProject_fnc_processMissionData", false, netId player] remoteExecCall ["ramdb_db_fnc_listLoad", 2, false];
```

## Notes

- This function retrieves the entire list stored at the specified key, making it useful when you need to process multiple elements together.
- Both the `_key` and `_function` parameters are required. The function will exit without action if either is empty.
- The retrieved data is processed asynchronously through the scheduler system and passed to the specified callback function.
- For multiplayer scenarios, you can specify a target client using the `_netId` parameter to send the retrieved data to that specific client.
- The `_call` parameter determines whether the callback function is executed in an unscheduled environment (true) or scheduled environment (false).
- This function uses the underlying "listrng" extension with a range from 0 to -1, which retrieves all elements in the list.
- All list operations are logged for debugging purposes.

## Related Functions
- `ramdb_db_fnc_listAdd`: Adds an element to a list
- `ramdb_db_fnc_listGet`: Retrieves a specific element from a list
- `ramdb_db_fnc_listSet`: Replaces a specific element in a list
- `ramdb_db_fnc_listRemove`: Removes a specific element from a list
- `ramdb_db_fnc_listDelete`: Deletes an entire list
- `ramdb_db_fnc_scheduler`: Processes the callback from the database extension

## Links

[List Add](listAdd.md) |
[List Delete](listDelete.md) |
[List Get](listGet.md) |
[List Load](listLoad.md) |
[List Remove](listRemove.md) |
[List Set](listSet.md)