Skip to Content
BuildcordDocs

Find rows

Look up rows in a collection.

data.query finds rows in a collection and reads the first into the run.

Settings

SettingWhat it does
CollectionThe collection to search.
WhereA condition, such as user = {user.id}. Empty matches every row.
Sorted byA column, then desc for largest first, such as score desc. Empty keeps the oldest first.
LimitHow many rows to find. The default is 1.
Read the row asThe name to read the row under. Its columns are {row.column} unless you name it.

Ways out

Way outTaken when
FoundAt least one row matched.
Nothing foundNone did.

Produces

TokenValue
{row.id}The number of the row found
{row.column}Each column of the row
{rows.count}How many rows matched
{rows.all}Every row found, up to the limit, as a list. Run code reads it as ctx.rows.all
{name.count}, {name.all}The same, when the row is named. Later finds don't replace them

Notes

  • Name the row with Read the row as when a later step finds a different row and you still need this one.
  • To work with several finds in one Run code step, name each one. Find user = {user.id} as mine and team = {option.team} as team, then read ctx.mine.all and ctx.team.all.
  • The canvas shows Collection where condition.

Example

Find the member's open ticket with user = {user.id} and status = open. If Nothing found, create one.

Was this page helpful?