> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bloxcord.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Live Tables

> Query and update BloxCord Live Tables (shared, dynamic data lists) from in-game.

Live Tables are shared, dynamic data lists managed on the dashboard. Each **list** has an id and contains **items/rows**. Expired and deleted entries are never returned.

## getLiveTableRowsByName

Finds all rows whose item name matches a given string, across lists.

```lua theme={null}
local rows = BloxCord:Invoke("getLiveTableRowsByName", itemName)
```

### Parameters

<ParamField body="itemName" type="string" required>
  The item name to search for.
</ParamField>

### Returns

<ResponseField name="rows" type="object[]">
  Matching rows. Empty if none match or the request failed.

  <Expandable title="row fields">
    <ResponseField name="listid" type="string">
      The id of the list the row belongs to.
    </ResponseField>

    <ResponseField name="id" type="string">
      The row's unique id.
    </ResponseField>

    <ResponseField name="user" type="object">
      The user/owner associated with the row, if it is a user list.
    </ResponseField>

    <ResponseField name="name" type="string">
      The item name.
    </ResponseField>

    <ResponseField name="description" type="string">
      The row description.
    </ResponseField>

    <ResponseField name="custom_keys" type="object">
      Arbitrary custom key/value data.
    </ResponseField>

    <ResponseField name="expiresAt" type="number | null">
      Expiry timestamp (ms), or null.
    </ResponseField>

    <ResponseField name="created" type="number">
      Creation time in **milliseconds**.
    </ResponseField>

    <ResponseField name="modified" type="number">
      Last-modified time in **milliseconds**.
    </ResponseField>
  </Expandable>
</ResponseField>

### Example

```lua theme={null}
local BloxCord = game:WaitForChild("BloxCord")

local rows = BloxCord:Invoke("getLiveTableRowsByName", "VIP Pass")
for _, row in ipairs(rows) do
    print(row.name, row.description)
end
```

***

## getLiveTableItemsById

Returns all items belonging to a specific list.

```lua theme={null}
local items = BloxCord:Invoke("getLiveTableItemsById", listId)
```

### Parameters

<ParamField body="listId" type="string" required>
  The id of the list to read.
</ParamField>

### Returns

<ResponseField name="items" type="object[]">
  The list's items. Same shape as the rows returned by [`getLiveTableRowsByName`](#getlivetablerowsbyname). Empty if the list is empty or the request failed.
</ResponseField>

### Example

```lua theme={null}
local BloxCord = game:WaitForChild("BloxCord")

local items = BloxCord:Invoke("getLiveTableItemsById", "warnlist")
print("List has", #items, "items")
```

***

## updateLiveTableItem

Updates the description and/or custom keys of a single Live Table item.

```lua theme={null}
local ok = BloxCord:Invoke("updateLiveTableItem", itemId, description, custom_keys)
```

<Note>
  Only the fields you provide are changed. Pass `nil` for `description` or `custom_keys` to leave that field untouched.
</Note>

### Parameters

<ParamField body="itemId" type="string" required>
  The id of the item to update.
</ParamField>

<ParamField body="description" type="string">
  New description. Only applied when a string is provided.
</ParamField>

<ParamField body="custom_keys" type="table">
  New custom key/value data. Only applied when a table is provided.
</ParamField>

### Returns

<ResponseField name="success" type="boolean">
  `true` if the item was updated. `false` if the item was not found or the request failed.
</ResponseField>

### Example

```lua theme={null}
local BloxCord = game:WaitForChild("BloxCord")

local ok = BloxCord:Invoke("updateLiveTableItem", itemId, "Updated note", {
    strikes = 2,
    lastSeen = os.time(),
})
```
