apex_add_item_computation
Add a computation to assign a value to an Oracle APEX item via static, SQL, PL/SQL, item copy, or sequence, with configurable timing and optional condition.
Instructions
Add a computation to set an item's value (STATIC, SQL, PL/SQL, ITEM).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page_id | Yes | Page ID. | |
| sequence | No | Computation order (for multiple computations on same item). | |
| item_name | Yes | Item to compute (e.g., "P10_USER"). Auto-prefixed if needed. | |
| condition_item | No | Only compute if this item is not null (optional). | |
| computation_type | No | How to compute the value: - "static_value": A literal string value - "plsql_expression": PL/SQL expression (e.g., ":APP_USER || '@company.com'") - "plsql_function": PL/SQL function body returning the value - "query": SQL query returning a single value (e.g., "SELECT name FROM users WHERE id = :P10_ID") - "item_value": Copy value from another item (set item name in computation_expression) - "sequence": Get next value from a DB sequence | static_value |
| computation_point | No | When to compute: - "BEFORE_HEADER": Before page renders (default) — good for initialization - "AFTER_SUBMIT": After form submit — good for post-processing - "BEFORE_BOX_BODY": Before page body renders | BEFORE_HEADER |
| computation_expression | No | The expression/value/SQL for the computation type. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |