Skip to Content
DocumentationDataGuidesQuery and Bind Data

Query and Bind Data

After configuring the database or API, fetch data through data sources and bind it to pages and components.

  • List components configure data sources directly
  • Pages and other components declare a page-level data source first

Workflow

Configure a data source

On pages or list components (List, Custom Selector, Data Selector):

  • List components: Data tab in the right sidebar
  • Pages: declare a data source on the page Data tab

For database sources:

SettingPurpose
FilterWHERE conditions
SortOrder; sort fields must match Distinct fields when both are used. Vector fields enable semantic sort
DistinctDedupe by field(s)
Limit1 = single record; >1 = array
⚠️

Comparing any value to null in a filter is always true. Use conditional data to substitute a value that makes the condition false when input is empty (e.g. id = -1 when ID is null).

Databinding

Bind query results to component content, component actions, or page actions.

SourceReference path
Page data sourcePage data → data source
List data sourceComponent data → list → list item / index

Example: Blog CRUD

Uses database, parameters, and database operations.

Data model

  • post table: title, content, author, published_status, show_at, like_count — one-to-many from account via author
  • notification table: sender_account, receiver_account, message — sender/receiver relations to account

Data model

Create — publish article

  1. Writing page with title input and rich text editor
  2. Insert action on Add button
  3. Map inputs to post fields; author = logged-in account id

Insert action

Read — article list

  1. List on home → data source post
  2. Filter published_status = true; sort show_at descending
  3. Bind title, cover to list item fields

List source

Read — detail page

  1. Detail page with path parameter blog_id
  2. List item Navigate action sets blog_id from item id
  3. Page data source filter: id = blog_id, limit 1
  4. Bind fields to display content

Detail filter

Update — like + notification

  1. Update post on Like — filter id = list item.id; like_count = like_count + 1
  2. On success, Insert notification — sender = logged-in account, receiver = list item.author, dynamic message

Like action

Notes

  • Subscription: real-time push when data changes — chat, live dashboards
  • Update/Delete: verify filters precisely — broad filters can affect entire tables
  • Arrays: use formulas such as GET_ITEM — see Formulas
  • Conditional values: Configure Conditional Data
Last updated on