Skip to content

uc-apx create region avatar

Insert a themeTemplateComponent/avatar region backed by an inline SQL query — the multiple (report) display that renders one avatar per row.

—avatar-type picks the source: image (+ —image-column), initials (+ —initials-column), or icon (+ —icon fa-*).

To render an avatar inside a report instead, use uc-apx edit column --type avatar on an IR/IG column.

uc-apx create region avatar [flags]
FlagTypeDefaultDescription
--avatar-typestringAvatar source type: image, initials, or icon [required]
--columnstringComma-separated columns the SQL projects. Syntax: NAME[:TYPE[:LENGTH]] [required]
--column-spanint12-col grid span for the region’s layout (0 = omit)
--css-classesstringCSS classes applied to the avatar, e.g. u-color-29 (optional)
--dry-runPrint rendered region to stdout without writing
--forceReplace an existing same-id region on the page
--iconstringStatic Font Awesome class, e.g. fa-user (required when —avatar-type icon)
--idstringRegion id (default: kebab-case of —name)
--image-columnstringColumn holding the image URL (required when —avatar-type image)
--initials-columnstringColumn holding the initials (required when —avatar-type initials)
--namestringDisplay name of the region [required]
--no-new-rowEmit startNewRow: false so this region sits next to the previous one
--pagestringTarget page (numeric ID, alias, or name) [required]
--pagination-rowsintentitiesPerPage for pagination (0 = omit)
--pk-columnstringColumn to flag as the primary key (optional)
--sequenceintLayout sequence (default: max existing + 10)
--shapestringAvatar shape: rounded, circular, square (optional)
--sizestringAvatar size: extraSmall, small, large, extraLarge, … (optional)
--slotstringbodyPage slot to place the region in
--sqlstringInline SQL query (or @path/to/file.sql; @@ 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 avatar --page 46 --name People --sql select product_name as title, image as avatar from oow_demo_products --column TITLE,AVATAR --avatar-type image --image-column AVATAR --dry-run
Generated APEXlang
region people (
name: People
type: themeTemplateComponent/avatar
source {
location: localDatabase
type: sqlQuery
sqlQuery:
```sql
select product_name as title, image as avatar from oow_demo_products
```
}
layout {
sequence: 50
slot: body
}
appearance {
template: @/blank-with-attributes-no-grid
templateOptions: #DEFAULT#
}
componentAppearance {
display: report
}
settings {
type: image
image: {
type: urlColumn
urlColumn: AVATAR
}
}
column TITLE (
layout {
sequence: 10
}
source {
databaseColumn: TITLE
dataType: varchar2
}
)
column AVATAR (
layout {
sequence: 20
}
source {
databaseColumn: AVATAR
dataType: varchar2
}
)
)