K
Docs
API Reference→Pieces→Random Row
🎲

Random Row

vault.randomThe VaultVault

Pulls one row out of a table at random — a random quote, a random winner, a random card from a deck. Filter it to pick only from some rows. Its columns become sparks: {{pick.text}}.

When to use this
  • →Want a random item from a list you typed in? That's Random Pick

On the canvas

This is what Random Row looks like when you place it on your flow. Each field below is something you configure in the inspector panel.

🎲
Random Row
vault.random
Vault
tablerequired
Pick a table…
filterColumn
Every row
filterOp
select…
filterValue
e.g. {{input.user.id}}
asrequired
pick
found
empty

Config fields

FieldTypeReqWhat it does
table
Pick a table…
textyesTable 🗄️
filterColumn
Every row
text—Only rows where… 🔍
filterOpselect—Is…
filterValue
e.g. {{input.user.id}}
text—This value
as
pick
textyesSave it as ✨

Output ports

foundA row was picked
emptyThere was nothing to pick from
📐

In TypeScript, this would be…

Not something you need to write — just a look at what Kitcord does for you.

TypeScript
const pick = await db.get("SELECT * FROM quotes ORDER BY RANDOM() LIMIT 1");
// {{pick.text}} — Picked ✓, or Empty ∅