Skip to content

uc-apx create computation

Splice a computation into a page. The computation writes a value into the page item named by —item at the chosen execution point. —type picks the source kind; supported values: function-body, item, plsql-expression, sql-query, static-value.

uc-apx create computation [flags]
FlagTypeDefaultDescription
--codestringPL/SQL or SQL body (literal or @path/to/file) for expression/function-body/sql-query
--dry-runPrint rendered computation to stdout without writing
--forceOverwrite an existing computation with the same id
--idstringConstruct id (default: kebab-case of —name, or —item lowercase when —name absent)
--itemitemName:Target item name to write into (becomes itemName: on the computation) [required]
--namestringDisplay name (optional — real exports often omit it; used to derive —id when —id is absent)
--pagestringTarget page (numeric ID, alias, or name) [required]
--pointstringbeforeHeaderexecution.point: afterFooter, afterHeader, afterRegions, afterSubmit, beforeFooter, beforeHeader, beforeRegions, newSession
--sequenceintexecution.sequence (default: max existing computation sequence at this point + 10)
--source-itemitemName:Source item name (required when —type item; becomes inner itemName:)
--typestringComputation source kind: function-body, item, plsql-expression, sql-query, static-value [required]
--valuestringLiteral value (required when —type static-value)
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 create computation \
--page 50 \
--name "Last viewed customer" \
--item LAST_VIEW \
--type static-value \
--value 50

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

Terminal window
uc-apx --app-dir examples/brookstrut create computation --page 46 --item P46_NAVIGATION --type static-value --value LIST --dry-run
Generated APEXlang
computation p46_navigation (
itemName: P46_NAVIGATION
execution {
sequence: 10
point: beforeHeader
}
computation {
type: staticValue
staticValue: LIST
}
)