apex_add_spotlight_metric
Add a large spotlight metric to an Oracle APEX page, using a SQL query to compute and display a prominent value with label, icon, and customizable styling.
Instructions
Add a large spotlight metric with value, label, and optional trend.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| icon | No | Font Awesome icon above the value. | fa-star |
| color | No | Accent color. | unimed |
| label | Yes | Metric label below the value. | |
| prefix | No | Unit prefix (e.g., "R$ ", "$"). | |
| suffix | No | Unit suffix (e.g., "%", " pts"). | |
| page_id | Yes | Target page ID. | |
| sequence | No | Display order on page. | |
| icon_size | No | CSS font-size for the icon (default "2.4rem"). | 2.4rem |
| sql_query | Yes | SQL returning a single scalar value. Example: "SELECT ROUND(AVG(NR_PCT_TOTAL),1) FROM TEA_AVALIACOES WHERE DS_STATUS='CONCLUIDA'" | |
| custom_css | No | Additional CSS rules injected into the style block. | |
| value_size | No | CSS font-size for the metric value (default "3.2rem"). | 3.2rem |
| region_name | Yes | Internal region name. | |
| subtitle_sql | No | Optional SQL for a smaller subtitle line below the label. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |