Skip to content

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]
FlagTypeDefaultDescription
--authzstringUpsert security.authorizationScheme: @<alias>. Strip a leading @ if you passed one. Pass empty to remove the property (leaves sibling security props intact).
--column-spanintUpsert layout.columnSpan (1–12). Pass 0 to remove the property (use the template default).
--dry-runPrint the rewritten file content to stdout without writing
--namename:Replace the region’s top name: property
--pagestringTarget page (numeric ID, alias, or name) [required]
--regionstringRegion id on the page [required]
--sequenceintUpsert layout.sequence (positive integer; +10 spacing keeps insertion ergonomics consistent)
--server-side-conditionnoneWipe-and-rewrite serverSideCondition { … } from a <type>=<value> string (e.g. requestIsContainedInValue=CREATE,SAVE). Pass none (or empty) to remove the block.
--slotstringUpsert layout.slot (e.g. body, breadcrumbBar, contentBody, dialogFooter, subRegions)
--source-sqlstringWipe-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-tablestringWipe-and-rewrite source { … } to the canonical tableName shape on an interactiveGrid (restores auto-row-processing). Mutually exclusive with —source-sql.
--source-wherestringOptional whereClause: line spliced into the new source block (only meaningful with —source-table).
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
Terminal window
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