uc-apx create region cards
Insert a new cards region. Source can be a local-database table
(—table, synthesised as select * from TABLE) or an inline SQL
query (—sql). Exactly one of —table or —sql is required.
Required: —pk-column (primary key) and —title-column (card heading). Optional slots: —subtitle-column, —body-column / —body-html, —icon-class (static fa-*) and/or —badge-column.
Optional media: —media-source urlColumn|blobColumn + —media-column. —media-source blobColumn additionally requires —media-mime-column.
—action-page N emits a fullCard redirect action targeting page N.
Deferred to Phase 3: REST source, secondaryBody, icon variants other than iconClass, multiple buttons, componentAppearance.gridColumns, paginated cards, theme templateOptions arrays.
uc-apx create region cards [flags]| Flag | Type | Default | Description |
|---|---|---|---|
--action-item-pair | strings | NAME=VALUE pair emitted inside the action’s target.items (repeatable). Replaces the default P<action-page>_<pk-column>: &<pk-column>. when set. | |
--action-page | int | Emit a fullCard redirect action targeting this page number | |
--badge-column | string | Column rendered as the card badge | |
--body-column | string | Column rendered as the card body (mutually exclusive with —body-html) | |
--body-html | string | HTML expression for the card body, supports &COL. substitutions (mutually exclusive with —body-column) | |
--column-span | int | 12-col grid span for the region’s layout (0 = omit; e.g. 6 for a half-width region) | |
--dry-run | Print rendered region to stdout without writing | ||
--force | Replace an existing same-id region on the page (deletes the old one first; inherits layout.sequence and slot unless overridden) | ||
--icon-class | string | Static Font Awesome icon class (e.g. fa-calendar-user); emits iconAndBadge with iconSource: iconClass | |
--id | string | Region id (default: kebab-case of —name) | |
--media-column | string | Column holding the image URL or BLOB (required when —media-source is set) | |
--media-mime-column | string | Column holding the MIME type (required when —media-source blobColumn) | |
--media-position | string | Media placement: first, body, or background (optional) | |
--media-source | string | Media source: urlColumn or blobColumn (triggers the -media template variant) | |
--name | string | Display name of the region [required] | |
--page | string | Target page (numeric ID, alias, or name) [required] | |
--pk-column | string | Primary key column [required] | |
--sequence | int | Layout sequence (default: max existing + 10) | |
--slot | string | body | Page slot to place the region in |
--sql | string | Inline SQL query (or @path/to/file.sql to read from disk; @@ escapes a literal leading @; mutually exclusive with —table) | |
--subtitle-column | string | Column rendered as the card subtitle (optional) | |
--table | string | Local-database table (mutually exclusive with —sql) | |
--title-column | string | Column rendered as the card title [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 cards --page 46 --name Product Cards --table OOW_DEMO_PRODUCTS --pk-column PRODUCT_ID --title-column PRODUCT_NAME --dry-runGenerated APEXlang
region product-cards ( name: Product Cards type: cards source { location: localDatabase type: sqlQuery sqlQuery: ```sql select * from OOW_DEMO_PRODUCTS ``` } layout { sequence: 50 slot: body } appearance { template: @/cards-container templateOptions: #DEFAULT# } card { primaryKeyColumn1: PRODUCT_ID } title { column: PRODUCT_NAME }
)