Skip to content

Query Manager (URL-driven state)

Use Query Manager to make page state URL-driven in Wappler, so searches, filters, sorting, paging, and selected records can survive reloads and be shared safely.

This tour frames Query Manager as the bridge between the current page state and the address bar. You will see how query parameters become readable App Connect values, how UI controls can write them back, and why this pattern is ideal for shareable list or detail views.

The key takeaway is not just that Query Manager edits the URL, but why that matters: it gives users refresh-safe and bookmarkable state, while giving you a clear source of truth for filters, paging, and record selection.

Shareable state
Copy/paste URL preserves filters and navigation.
No custom JS
Use App Connect actions instead of manual URL manipulation.
Works with data traversal
Drive Data View and Data Detail from query params.
Search terms in ?q=
Filters in ?category=
Paging in ?page=

Query values are strings. Convert types (toNumber()) when doing numeric comparisons or paging math.

important: Always treat query values as strings until you explicitly convert them.

page.toNumber() for paging
id.toNumber() for numeric keys
Keep comparisons type-safe

The common loop is: read query → bind UI → update query with actions → data-driven UI updates.

Bind inputs/selects to queryManager.param so the UI reflects the URL on load and on navigation.

Use actions like query.set(name, value), query.remove(name), and query.removeAll() in event handlers (click/change/submit).

set(name, value)
Writes or replaces a query param.
remove(name)
Removes one param.
removeAll()
Clears query state (reset view).
Update query on submit/click
Avoid assigning to properties directly
Let App Connect re-render

Use query params inside Data View filter/sort/page so the view reacts when query changes.

filter uses query.search
sort uses query.sortOn + query.sortDir
page uses query.page.toNumber()

Store a selected record key in the query (e.g. ?id=42), then let Data Detail select the matching record.

Click item → query.set('id', record.id)
Data Detail key binds to query.id
Detail UI binds to detail.data.*

Next, decide whether you need URL state or storage state.

Pick a related tour to continue.