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 selects a row in a VA visualisation and is immediately able to edit the corresponding row(s) in a SAS table - 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 opens in its normal read-only / Filter mode. |
va |
Same chrome-hiding as true, plus editor starts in edit mode, "Add Row" / Cancel / top action buttons are hidden, and a single bottom Submit button is rendered. |
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:
- Resolves each VA
parameterto a DC column by matching on column label. - Builds a filter (using existing Filter machinery) over the selected primary-key values.
- Hides any VA columns marked as
brushso the grid stays focused on the user-editable columns (except primary key cols which are always shown) - Navigates to
/editor/<table>/<FILTER_RK>?embed=vaso the filtered view is shareable and survives reloads.
If VA sends an empty / unmatched message the editor falls back to the unfiltered view but stays in VA mode.
Security¶
Only postMessage events from the hosting parent frame (or the same origin in
dev/tests) are honoured - see VaMessagingService.isTrustedSource().
Configuration in VA¶
In the VA Report Designer, add a Data-Driven Content object and set the URL to the editor route shown above. Map the report data items so they include the primary key column(s) of the target DC table.