Files
docs.datacontroller.io/docs/embed-va.md
T
dc-bot 63dea99371 docs: document v7.13.0 features
- Live formulas (HARDFORMULA/SOFTFORMULA) with HyperFormula in dcc-validations
- Formula Rules section with column-name syntax, DC.* literals, editor behaviour
- MPE_VALIDATIONS table doc: add HARDFORMULA/SOFTFORMULA to RULE_TYPE values
- Roadmap: mark Frontend Formulae and Regex Rules as delivered
- SAS VA Embed: document Live vs Confirm filter modes and pending-changes UX
- ViewBoxes: document edge/corner drag resizing
- Licensing: combined-key paste, live key preview, protocol mismatch guard
- CAS Tables: REPLACE load type support and temp table cleanup
- Editor: native date/time pickers, paste-validation overlay, row status indicators
- Stage page: Formatted/Unformatted toggle on the approvals screen
- Viya deploy: configurator overhaul, deploy checks, login page UX
- Index page: add live formulas and VA embed to features list
2026-09-03 17:15:35 +00:00

60 lines
3.0 KiB
Markdown

---
layout: article
title: SAS Visual Analytics Embed
description: Embed the Data Controller editor inside a SAS VA report as a data-driven content object. Row selections in the VA report drive filters and column visibility in the editor.
---
# Embedding inside SAS Visual Analytics
Data Controller can be embedded inside a SAS Visual Analytics report as a **data-driven content** (DDC) object. This unlocks scenarios where a user can safely modify the values in an underlying SAS table, and have the visualisation updated- all from inside the same report.
## URL
Open the editor as a DDC by appending `?embed=va` to the editor route:
```
`https://yourserver/DC/#/editor/<library>/<table>?embed=va`
```
The `?embed=` parameter accepts three values:
| Value | Behaviour |
|---|---|
| `true` | Chrome (header, back button, sub-nav) is hidden. Editor functions normally. |
| `va` | Same chrome-hiding as `true`, **plus** editor becomes "VA-aware" - any report filters are captured, and columns can be displayed / hidden using the Edit Report interface. Filter button is disabled (use VA filters instead)|
| `false` (or omitted) | Standard interactive UI. |
## How VA drives the editor
VA pushes a JSON payload to the iframe via `window.postMessage` whenever the selected rows change. Data Controller listens for these messages and:
1. Resolves each VA `parameter` to a DC column by matching on column label.
2. Builds a filter (using existing [Filter](/filter/) machinery) over the selected values.
3. Hides any VA columns marked as `brush` so the grid stays focused on the user-editable columns (except primary key cols which are always shown)
If VA sends an empty / unmatched message the editor falls back to the unfiltered view but stays in VA mode.
More logic available in [`va-messaging.service.ts'](https://git.datacontroller.io/dc/dc/src/branch/main/client/src/app/services/va-messaging.service.ts).
## Filter Modes
When running in `embed=va` mode, the editor provides two filter modes, controlled by the **Auto-apply** checkbox:
* **Live (default)** - each VA row selection is applied automatically after a short debounce, so the editor updates as you interact with the report.
* **Confirm** - VA filter changes are staged but not applied until you click the **Apply** button. This is useful in edit mode, where an automatic reload would discard unsaved changes.
In both modes a status indicator shows whether a VA filter change is pending, loading, or idle. In edit mode, a pending filter stays staged until the user leaves edit mode, so unsaved edits are never lost.
## Configuration in VA
In the VA Report Designer, add a **Data-Driven Content** object and set the URL to the editor route shown above. Be sure that any report level filters have their corresponding parameters added to the DDC object itself.
## Debugging
The following snippet can be used in console to dump the values being provided to DC from VA:
```
console.log(JSON.stringify(window.__vaLastMessage?.data, null, 2))
```