uc-apx create region faceted-search
Insert a paired facetedSearch + classicReport region into the target page.
The CLI writes BOTH regions in one atomic edit: the classic-report (results
region) holds the SQL projection + columns, and the faceted-search region
wires source { filteredRegion: @<results-id> } and one facet per —facet
flag.
Facet spec syntax (repeatable —facet): search — bare full-text facet (sequence 10) search:COL1,COL2,COL3 — search with explicit source.dbColumns checkbox:STATUS — checkboxGroup with distinctValues LOV range:BUDGET:STATIC2:<200;|… — range with a verbatim STATIC2 LOV payload
uc-apx create region faceted-search [flags]| Flag | Type | Default | Description |
|---|---|---|---|
--column | string | Classic-report columns. Syntax: NAME[:TYPE[:LENGTH]] comma-separated [required] | |
--dry-run | Print rendered regions to stdout without writing | ||
--facet | stringArray | Facet spec (repeatable). Syntax: search | search:COL1,COL2 | checkbox:COL | range:COL:STATIC2_PAYLOAD [required, at least one] | |
--facet-width | int | 4 | 12-col grid span for the faceted-search region (0 = no columnSpan emitted) |
--force | Replace existing regions on collision (either id) | ||
--id | string | Faceted-search region id (default: kebab-case of —name) | |
--name | string | Display name of the faceted-search region [required] | |
--page | string | Target page (numeric ID, alias, or name) [required] | |
--replace | string | Replace this existing region (any kind) with the new FS pair, inheriting its sequence/slot. Lets you convert e.g. an IR into a faceted-search in one command. | |
--results-id | string | Classic-report region id (default: kebab-case of —results-name) | |
--results-name | string | Display name of the classic-report (default: “<name> Results”) | |
--results-slot | string | body | Page slot for the classic-report region |
--results-width | int | 8 | 12-col grid span for the classic-report region (0 = no columnSpan emitted) |
--sequence | int | Layout sequence for the faceted-search region (default: next + 0) | |
--slot | string | body | Page slot to place the faceted-search region in |
--sql | string | Inline SELECT statement for the classic-report (or @path/to/file.sql to read from disk; @@ escapes a literal leading @) [required] |
Global Flags
Section titled “Global Flags”| Flag | Type | Default | Description |
|---|---|---|---|
--app-dir | string | . | Path to the APEX application directory |
--json-pretty | Output in pretty-printed JSON (human-readable) instead of minified JSON | ||
--toon | Output in TOON format (human-readable, token-efficient) instead of JSON |
Example Generated APEXlang
Section titled “Example Generated APEXlang”Using --dry-run to preview the generated construct (no files are written):
uc-apx --app-dir examples/brookstrut create region faceted-search --page 46 --name Product Search --facet search --sql select product_id, product_name from oow_demo_products --column PRODUCT_ID:number,PRODUCT_NAME:varchar2:100 --dry-runGenerated APEXlang
region product-search ( name: Product Search type: facetedSearch source { filteredRegion: @product-search-results } layout { sequence: 50 slot: body columnSpan: 4 } appearance { template: @/standard templateOptions: [ #DEFAULT# t-Region--noPadding t-Region--hideHeader js-addHiddenHeadingRoleDesc t-Region--scrollBody ] } settings { compactNosThreshold: 10000 showCurrentFacets: selector currentFacetsSelector: #active_facets showTotalRowCount: true displayChartForTopNValues: 10 }
facet P46_SEARCH ( type: search label { label: Search } layout { sequence: 10 } ) )
region product-search-results ( name: Product Search Results type: classicReport source { location: localDatabase type: sqlQuery sqlQuery: ```sql select product_id, product_name from oow_demo_products ``` } layout { sequence: 60 slot: body columnSpan: 8 startNewRow: false } appearance { template: @/standard templateOptions: #DEFAULT# } componentAppearance { template: @/standard templateOptions: #DEFAULT# } pagination { type: rowRangesXToYNoPagination } messages { whenNoDataFound: No data found }
column PRODUCT_ID ( reportColumnQueryId: 1 derivedColumn: N heading { heading: Product Id alignment: end } layout { sequence: 10 columnAlignment: end } )
column PRODUCT_NAME ( reportColumnQueryId: 2 derivedColumn: N heading { heading: Product Name } layout { sequence: 20 } ) )