Skip to content

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]
FlagTypeDefaultDescription
--columnstringClassic-report columns. Syntax: NAME[:TYPE[:LENGTH]] comma-separated [required]
--dry-runPrint rendered regions to stdout without writing
--facetstringArrayFacet spec (repeatable). Syntax: search | search:COL1,COL2 | checkbox:COL | range:COL:STATIC2_PAYLOAD [required, at least one]
--facet-widthint412-col grid span for the faceted-search region (0 = no columnSpan emitted)
--forceReplace existing regions on collision (either id)
--idstringFaceted-search region id (default: kebab-case of —name)
--namestringDisplay name of the faceted-search region [required]
--pagestringTarget page (numeric ID, alias, or name) [required]
--replacestringReplace 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-idstringClassic-report region id (default: kebab-case of —results-name)
--results-namestringDisplay name of the classic-report (default: “<name> Results”)
--results-slotstringbodyPage slot for the classic-report region
--results-widthint812-col grid span for the classic-report region (0 = no columnSpan emitted)
--sequenceintLayout sequence for the faceted-search region (default: next + 0)
--slotstringbodyPage slot to place the faceted-search region in
--sqlstringInline SELECT statement for the classic-report (or @path/to/file.sql to read from disk; @@ escapes a literal leading @) [required]
FlagTypeDefaultDescription
--app-dirstring.Path to the APEX application directory
--json-prettyOutput in pretty-printed JSON (human-readable) instead of minified JSON
--toonOutput in TOON format (human-readable, token-efficient) instead of JSON

Using --dry-run to preview the generated construct (no files are written):

Terminal window
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-run
Generated 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
}
)
)