uc-apx edit region
Edit an existing region <ID> ( ... ) on a page without
rescaffolding it (and losing its columns / items / buttons /
sub-regions). Common rewrites:
- rename a region (top
name:property); - replace the SELECT on a sqlQuery-backed CR / IR / IG / cards region;
- flip an interactiveGrid back to table-mode source (restores auto-row-processing);
- move the region between layout slots (e.g. body → contentBody);
- tweak layout.sequence / columnSpan / startNewRow;
- attach an authorization scheme or serverSideCondition gate.
Each —flag corresponds to a single property or block. Combine flags to apply multiple changes in one shot; the region is re-parsed after the edits to fail-fast on a broken splice.
Out of scope: changing region type:. To convert a region between
types, use create region <type> --force --id <same-id> — that path
is type-aware and rebuilds the per-type template correctly.
uc-apx edit region [flags]| Flag | Type | Default | Description |
|---|---|---|---|
--authz | string | Upsert security.authorizationScheme: @<alias>. Strip a leading @ if you passed one. Pass empty to remove the property (leaves sibling security props intact). | |
--column-span | int | Upsert layout.columnSpan (1–12). Pass 0 to remove the property (use the template default). | |
--dry-run | Print the rewritten file content to stdout without writing | ||
--name | name: | Replace the region’s top name: property | |
--page | string | Target page (numeric ID, alias, or name) [required] | |
--region | string | Region id on the page [required] | |
--sequence | int | Upsert layout.sequence (positive integer; +10 spacing keeps insertion ergonomics consistent) | |
--server-side-condition | none | Wipe-and-rewrite serverSideCondition { … } from a <type>=<value> string (e.g. requestIsContainedInValue=CREATE,SAVE). Pass none (or empty) to remove the block. | |
--slot | string | Upsert layout.slot (e.g. body, breadcrumbBar, contentBody, dialogFooter, subRegions) | |
--source-sql | string | Wipe-and-rewrite source { … } to the canonical sqlQuery shape with this SELECT (or @path/to/q.sql to read from disk; @@literal escapes a leading @). Allowed only on classicReport / interactiveReport / interactiveGrid / cards regions. | |
--source-table | string | Wipe-and-rewrite source { … } to the canonical tableName shape on an interactiveGrid (restores auto-row-processing). Mutually exclusive with —source-sql. | |
--source-where | string | Optional whereClause: line spliced into the new source block (only meaningful with —source-table). |
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 |
Examples (from help)
Section titled “Examples (from help)”uc-apx edit region --page 50 --region my-predictions \ --source-sql 'select * from wc_predictions where username = :APP_USER'
uc-apx edit region --page 50 --region my-predictions --source-sql @./q.sql
uc-apx edit region --page 60 --region predictions \ --source-table WC_PREDICTIONS --source-where 'username = :APP_USER'
uc-apx edit region --page 50 --region my-predictions --slot contentBody --sequence 30
uc-apx edit region --page 50 --region customers --column-span 6 --no-new-row
uc-apx edit region --page 50 --region customers --authz @administration-rights
uc-apx edit region --page 50 --region customers \ --server-side-condition requestIsContainedInValue=CREATE,SAVE