Searchable Table
Show the results of a query that retrieves data from the application’s SQL schema.
Outline Display: The query is: {{query}}
{{customShow:The query results are shown with the following custom rules: {{customShow}}}}
{{customLabels:The table column headers will be modified to: {{customLabels}}}}
Details
The displayed table includes a built-in full-text search bar that filters across all displayed columns using case-insensitive LIKE matching. Columns are sortable by clicking headers. Results are paginated at 50 rows per page with LIMIT/OFFSET. The query can accept UI parameters from the handler’s URL and the logged-in username. Custom show ingredients can override how individual columns are rendered. SQL filter ingredients provide user-facing filter widgets (dropdowns, range sliders) that add WHERE clauses to the query.
Requirements
The query SQL query must: (1) Select columns you want displayed using fully qualified names. (2) Give each selected column an AS alias – these aliases become the column names in the displayed table. (3) Use table joins via WHERE clauses if querying multiple tables. (4) May include WHERE, GROUP BY, ORDER BY, LIMIT as needed. CORRECT PATTERN: SELECT “Table”.“Column1” AS “Column1”, “Table”.“Column2” AS “Column2”, “Table”.“Column3” AS “Column3” FROM “Table” WHERE “Table”.“Status” = ‘Active’ ORDER BY “Table”.“Column1” DESC.
Local scope
Names introduced within this component’s knobs:
uiArgs– virtual table holding this handler’s parameterstable– result columns ofquery(referenceable as a virtual table)
Settings
Required
-
query: SQL query
The query that generates the table.Scope: all columns of
uiArgs(reference as[ColumnName], e.g.,[Name],[Price]), current username as[Username](only where the handler authenticates: a logged-in page, or the calling user of an MCP tool, including inside its pipeline).
Optional
-
sqlFilter: ingredient slot ofsqlFilterIngredients(query)(many)
GUI widgets for letting the user filter the query -
customShow: ingredient slot ofcustomShowIngredientsList(table)(many)
Custom ways to show columns