---
title: ArmaRAMDb - Hash Get
icon: mdi:file-text-outline
excerpt: Get a field value from the current client's hash table in RAMDb.
---

# ramdb_db_fnc_hashGet

## Description
Retrieves the value associated with a specific field in the hash table of the current client/player. This function automatically determines the appropriate hash ID based on the caller's identity, making it more convenient than `hashGetId` which requires manually specifying an ID. It accesses hash data asynchronously and returns the result through a callback function.

## Syntax
```sqf
[_keyField, _function, _call, _netId] call ramdb_db_fnc_hashGet
```

## Parameters
| Parameter   | Type    | Description                                                | Default |
|-------------|---------|------------------------------------------------------------|---------|
| `_keyField` | String  | Name of the field in the hash to retrieve                   | ""      |
| `_function` | String  | Name of the function to receive the retrieved data          | ""      |
| `_call`     | Boolean | Whether to call the function directly (true) or spawn (false) | false  |
| `_netId`    | String  | (Optional) NetID of the player to receive the data          | ""      |

## Return Value
None. The retrieved data is passed to the specified callback function asynchronously.

## Examples
### Retrieve a player's loadout:
```sqf
["loadout", "ramdb_db_fnc_test"] call ramdb_db_fnc_hashGet;
```

### Retrieve data with synchronous callback:
```sqf
["playerScore", "ramdb_db_fnc_processScore", true] call ramdb_db_fnc_hashGet;
```

### Retrieve data and send it to a specific client:
```sqf
["loadout", "ramdb_db_fnc_test", false, netId player] remoteExecCall ["ramdb_db_fnc_hashGet", 2, false];
```

## Notes
- Retrieves a value from the current client's hash table
- The data is retrieved asynchronously through the extension's callback system
- Both the field name and callback function name must be provided
- Input validation ensures both required parameters are non-empty
- When a netId is provided, the data is sent to that specific client
- The `_call` parameter determines whether the function is called directly (synchronous) or spawned (asynchronous)
- This function automatically determines which hash table to use based on the caller's identity
- Use `hashGetId` when you need to specify a particular hash table by ID
- All operations are logged for debugging purposes

## Related Functions
- `ramdb_db_fnc_hashGetId`: Retrieves a field value from a specific hash table (when you need to specify the ID)
- `ramdb_db_fnc_hashGetAll`: Retrieves all fields from the current client's hash table
- `ramdb_db_fnc_hashGetAllId`: Retrieves all fields from a specific hash table
- `ramdb_db_fnc_hashSet`: Sets a field value in the current client's hash table
- `ramdb_db_fnc_scheduler`: Processes the callback from the database extension

## Links

[Hash Delete](hashDelete.md) |
[Hash Delete ID](hashDeleteId.md) |
[Hash Get](hashGet.md) |
[Hash Get All](hashGetAll.md) |
[Hash Get All ID](hashGetAllId.md) |
[Hash Get ID](hashGetId.md) |
[Hash Remove](hashRemove.md) |
[Hash Remove ID](hashRemoveId.md) |
[Hash Set](hashSet.md) |
[Hash Set Bulk](hashSetBulk.md) |
[Hash Set ID](hashSetId.md) |
[Hash Set ID Bulk](hashSetIdBulk.md)