Author SHA1 Message Date
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
7 changed files with 142 additions and 40 deletions
+8
View File
@@ -22,3 +22,11 @@ Button info as follows:
|Update Licence Key| Link to the screen for providing a new Data Controller licence key|
|Export DC Library DDL|COMING SOON!! <br>Exports the data controller control library in DB specific DDL (eg SAS, PGSQL, TSQL) and allows an optional schema name to be included|
## Licence Key Screen
The licence key screen accepts a Data Controller licence key and activation key. The following features are available:
* **Combined-key paste** - paste a multi-field licence key (prefixed `DCKEY1:`) into either the licence key field or the dedicated combined-key input, and both the licence key and activation key are populated automatically. The key format can be toggled between combined and legacy two-field input.
* **Live key preview** - as soon as both fields are populated, the key is decrypted speculatively and its details (valid until, number of users, feature flags, etc.) are displayed before you click Apply, so you can verify the key is correct.
* **Protocol mismatch guard** - if you paste a key generated for a different protocol than the page is currently using (http vs https), the Apply button is blocked and a warning is shown. A key generated for an insecure connection carries the same text in both fields; a key generated for a secure connection carries two different values, so the mismatch can be detected before any decrypt attempt.
+14
View File
@@ -39,6 +39,16 @@ Note that since the CAS connection is using a shared account, the CASUSER librar
It can happen that a CAS table is configured in Data Controller but not loaded into memory. In this case, when a user selects the table, it will be automatically loaded.
### REPLACE Load Type
The REPLACE load type is fully supported on CAS tables. When a REPLACE load is applied to a CAS target, Data Controller:
1. Casts any fixed-length character variables in the staging table to varchar (matching the target table structure), since fixed char variables cannot be appended to CAS varchar columns.
2. Truncates the target CAS table in-place using `proc cas; table.deleteRows` (CAS tables do not support SQL deletes).
3. Appends the staged data via a data step with `sessref=dcsession`.
The truncate is deliberately the last step before the append, to minimise the time in which the target table is empty. See [MPE_TABLES](/dcc-tables/#loadtype) for general REPLACE documentation.
## Unloading
After an approval, the in-memory version of the CAS Table will be updated. To apply this to the underlying file on disk, the following code must be executed (eg in a POST APPROVE HOOK):
@@ -54,3 +64,7 @@ quit;
## Special Variables
Processing of data in Data Controller is performed in SPRE with SAS datasets - and as such, it is not possible to process character variables longer than 32k or other CAS specific data types.
## Temporary Table Cleanup
Temporary `casuser` tables created during loading (eg the REPLACE cast-and-append step above) are cleaned up correctly, including in error conditions. If a load is aborted before completion, any temp tables created mid-process are dropped before the lock is released.
+6 -4
View File
@@ -50,15 +50,15 @@ New rows can be added using the right click context menu, or the 'Add Row' butto
#### Native Date and Time Pickers
Date, time, and datetime columns use native browser pickers when editing a cell. This provides a familiar calendar and time selector, and respects your browser's locale settings for date and time formats.
Date, time, and datetime columns use native browser pickers in the editor, providing a familiar, locale-aware editing experience. Date columns use an `<input type="date">` picker, time columns use `<input type="time">` (24-hour), and datetime columns use `<input type="datetime-local">`. The pickers are backed by Handsontable 17 Intl cell types for consistent formatting.
#### Paste Validation Overlay
When you paste data into the editor (or drag to autofill cells), a confirmation overlay appears so you can review the changes before they are applied. All pasted values are checked against your configured [validation rules](/dcc-validations/). For large pastes, a progress indicator shows how many cells have been validated.
When you paste data into the editor (or autofill cells by dragging), a validation overlay appears before the changes are applied. This lets you review the pending changes and cancel or confirm them. All pasted and autofilled cells are validated against the configured [validation rules](/dcc-validations/). For large pastes, a progress banner shows the validation status.
#### Row Status Indicators
Each row's header cell is colour-coded to show its current status - modified, added, deleted, or unchanged. The "modified" indicator uses a `±` symbol so you can quickly spot which rows have changed.
The row-header status cells are colour-coded to show whether each row is modified, added, deleted, or unchanged. The "modified" symbol is `±` for clearer visual feedback.
When ready to submit, hit the SUBMIT button and enter a reason for the change. The owners of the data are now alerted (so long as their email addresses are in metadata) with a link to the approve screen.
If you are also an approver you can approve this change yourself.
@@ -72,11 +72,13 @@ Data Controller supports special missing numerics, ie - a single letter or under
The Data Controller only permits BiTemporal data uploads at a single point in time - so for convenience, when viewing data in the edit screen, only the most recent records are displayed. To edit earlier records, either use file upload, or apply a filter.
### Submitted
This page shows a list of the changes you have submitted (that are not yet approved). When you open a submitted change for review, you can toggle between viewing the data with SAS formats applied (eg formatted dates and currency) or as raw underlying values. This is useful when you need to verify the exact value being submitted rather than its display representation.
This page shows a list of the changes you have submitted (that are not yet approved).
### Approvals
This shows the list of changes that have been submitted to you (or your groups) for approval.
When you open a submitted change for review, the staged data is displayed alongside the current values so you can see exactly what will change. A **Formatted / Unformatted** toggle on the staging page lets you switch between viewing the data with SAS formats applied (eg `DATE9.` dates, `DOLLAR8.` currency) or as raw underlying values. This is useful when you need to verify the actual value being submitted rather than its display representation.
### History
View the list of changes to each table, who made the change, when, etc.
+28 -23
View File
@@ -35,8 +35,8 @@ Check back frequently as we keep growing this list of checks.
|HIDDEN|(defaultval) |Hides the column from the editor grid while still submitting its data. The defaultval is used when rows are added. |
|ROUND|2 |Rounds numeric input on paste/edit. Positive digits round to number of decimal places (eg 2 rounds to 0.01) Negative digits round to the nearest ten/hundred etc. Half-away-from-zero rounding is applied so `-0.5 → -1` and `2.5 → 3`. |
|NUMBER_FORMAT|`{"style":"currency","currency":"GBP"}` |Display-only [`Intl.NumberFormat` renderer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat). RULE_VALUE is the JSON options object passed straight to `Intl.NumberFormat`. Does not change the stored value. |
|HARDFORMULA|`= PRICE * VOLUME`|The cell displays a value computed from a formula, using other columns in the same row. The column is read-only - the user cannot override the result. See [Formula Rules](#formula-rules) below.|
|SOFTFORMULA|`= if( DC.ROW_STATUS != 'U', DC.USER_NAME, DC.ORIG_VALUE )`|Like HARDFORMULA, but the user can override the computed value and type their own. See [Formula Rules](#formula-rules) below.|
|HARDFORMULA|`= PRICE * VOLUME`|Evaluates a live, spreadsheet-style formula in the editor using [HyperFormula](https://hyperformula.handsontable.com/). The column is rendered read-only and the computed value (not the formula text) is submitted on save. See [Formula Rules](#formula-rules) below.|
|SOFTFORMULA|`= if( DC.ROW_STATUS != 'U', DC.USER_NAME, DC.ORIG_VALUE )`|Same as HARDFORMULA but the cell remains editable - the user can override the computed value. See [Formula Rules](#formula-rules) below.|
|HARDREGEX|`^[A-Z]{3}$`|The cell value **must** match the regex pattern, otherwise submission is blocked and the cell is highlighted red. See [Regex Rules](#regex-rules) below.|
|SOFTREGEX|`^[A-Z]{3}$`|A cell value that does not match the regex pattern is highlighted yellow as a warning, but submission is **not** blocked. See [Regex Rules](#regex-rules) below.|
|HARDSELECT|sashelp.class.name|A distinct list of values (max 1000) are taken from this library.member.column reference, and the value **must** be in this list. This list may be supplemented by entries in the MPE_SELECTBOX table.|
@@ -47,44 +47,49 @@ Check back frequently as we keep growing this list of checks.
## Formula Rules
HARDFORMULA and SOFTFORMULA let you configure a column so that its value is automatically calculated from other columns in the same row - just like a spreadsheet formula. When a user opens the editor, the formula is evaluated live and the result is shown in each cell.
HARDFORMULA and SOFTFORMULA bring live, spreadsheet-style formula evaluation to the Data Editor using the [HyperFormula](https://hyperformula.handsontable.com/) engine (the same library that powers formula calculation in Handsontable). When a column has either rule, the editor evaluates the formula in real time and displays the computed value in each cell.
### Writing a formula
### How formulas are written
Formulas use column names, not cell references, so there is no need to know the grid layout. For example, if you have PRICE and VOLUME columns, a REVENUE column formula would be:
Formulas are written using column names rather than cell references, so end users do not need to know the grid layout:
```
= PRICE * VOLUME
```
|ITEM|PRICE|VOLUME|REVENUE|
|---|---|---|---|
|PAPER|4.20|100|`= PRICE * VOLUME`|
|PEN|61.02|1,971|`= PRICE * VOLUME`|
Each row calculates its own result - the PRICE in row 1 is multiplied by the VOLUME in row 1, the PRICE in row 2 by the VOLUME in row 2, and so on.
At runtime the editor translates each column name to the correct cell reference for the current row (eg `PRICE` becomes `B1` in the first row, `B2` in the second, and so on).
!!! note
Each column name in the formula must be surrounded by spaces (eg ` PRICE ` not `PRICE`) so it is recognised as a column reference rather than part of a function name. For example, `=MATCH( PRICE )` resolves the column reference, but `=MATCH(PRICE)` does not - PRICE is left unrecognised and the formula will error rather than using the column's value. Text inside quotes is left as-is.
Each named variable **must have a leading and trailing blank** so it does not clash with function names (eg `MATCH()`). Variables inside single or double quoted strings are left untouched - eg `= "hello " & ITEM & " world"` resolves `ITEM` but not the word `ITEM` inside the string literal.
### HARDFORMULA vs SOFTFORMULA
* **HARDFORMULA** - the column is read-only. The formula result is always shown and submitted. The user cannot change it.
* **SOFTFORMULA** - the cell shows the formula result but the user can type a different value if needed. If they do, their value is submitted instead.
* **HARDFORMULA** - the column is read-only. The formula is always evaluated and the computed value is displayed and submitted. The user cannot override it.
* **SOFTFORMULA** - the cell starts with the computed value but remains editable. The user can type a different value, which is then submitted instead of the formula result.
### Editor behaviour
### Formula-aware behaviour across the editor
* When you paste a formula into the grid, column names are automatically translated so the formula works in its new position.
* A cell that is overwritten by a formula is flagged so you can revert it.
* Formula-looking values pasted from Excel are treated as plain data (not evaluated), unless you explicitly choose "Apply as formula".
Live formulas are evaluated for any character column, not just those with explicit HARDFORMULA / SOFTFORMULA rules. Several editor behaviours have been extended to be formula-aware:
### Special values
* When you paste a formula, column names are automatically translated to the correct cell references.
* A cell overwritten by a formula is flagged so you can revert it; cell revert has been generalised to any overwritten value, not just formulas.
* The primary key and numeric columns resolve a live formula to its computed value (not the raw formula text) when submitted.
* Formula-looking values pasted from Excel are auto-escaped so they are treated as data, not evaluated as formulas, unless you explicitly choose "Apply as formula".
* A dedicated `DC.ROW_STATUS` column is driven live by formulas, and has been hardened against collisions with real columns of that name.
Formulas can reference three special values that are resolved at runtime:
### Special formula literals
* `DC.ROW_STATUS` - the current state of the row: `M` (Modified), `A` (Added), `D` (Deleted), or `U` (Unchanged). A newly-added row is `A` from the moment it is created - there is no transient state before that.
* `DC.USER_NAME` - the logged-in user id.
* `DC.ORIG_VALUE` - the original cell value before the current edit.
The following literals are available for use in formula rules:
Example - show the current user id if the row is changed, otherwise keep the original value:
* `DC.ROW_STATUS` - replaced at runtime with the cell reference (eg `A1`). Values are `M` (Modified), `A` (Added), `D` (Deleted), or `U` (Unchanged).
* `DC.USER_NAME` - replaced at runtime with the logged-in user id.
* `DC.ORIG_VALUE` - replaced at runtime with the original cell value before the current edit.
Example - show the current user id if the row has been changed, otherwise keep the original value:
```
= if( DC.ROW_STATUS != 'U', DC.USER_NAME, DC.ORIG_VALUE )
RULE_VALUE = if( DC.ROW_STATUS != 'U', DC.USER_NAME, DC.ORIG_VALUE )
```
+15 -1
View File
@@ -130,6 +130,20 @@ Now the services are deployed (including the service which creates the staging a
* Admin Group - the members of this group will have full access to Data Controller
* Compute Context - the context configured in Step 1
!!! note
The first-launch configuration tab has been overhauled. The **Groups** dropdown starts with the logged-in user's own groups, the **Contexts** dropdown is grouped by batch user id (contexts without batch ids appear last), and a new **Verify** button calls the startup service to confirm it is running before switching to the regular flow. If the getAdminGroup response is missing items, an abort modal is shown instead of failing silently.
!!! note
The login page has been improved with better input contrast and validation. Submitting empty fields no longer produces an infinite spinner.
### Deploy Checks
The deploy flow now includes Viya deploy checks and startup diagnostics to catch configuration issues early. A chunked deploy script is used for reliability on larger Viya installations. During deploy, the compute context is auto-fixed and `ComputeContextDetails` is extended with Viya response fields.
!!! note
A debug comment is added to the compute context during deploy. This is permanent - it is not removed by subsequent deploys.
### Optimisation
At this point, every DC request will read the `services/public/settings.sas` file to get the DC library (and other) settings. To avoid these API calls (which will speed up the app) we can simply move this code to the autoexec. Steps as follows:
@@ -175,4 +189,4 @@ It is possible to embed a Data Controller table within SAS Visual Analytics by s
To make the portlet more visually appealing, the Data Controller title bar can be removed by adding `?embed=true` to the URL. When opening in a new window, the title bar will be gone.
For a deeper VA integration - where report row selections drive filters and column visibility in the Data Controller editor - append `?embed=va` instead. See the [SAS Visual Analytics Embed](/embed-va/) page for details on filter modes, configuration, and debugging.
For a deeper VA integration - where report row selections drive filters and column visibility in the Data Controller editor - append `?embed=va` instead. See the [SAS Visual Analytics Embed](/embed-va/) page for details on filter modes, configuration, and debugging.
+3 -3
View File
@@ -42,10 +42,10 @@ More logic available in [`va-messaging.service.ts'](https://git.datacontroller.i
When running in `embed=va` mode, the editor provides two filter modes, controlled by the **Auto-apply** checkbox:
* **Live (default)** - the editor updates automatically as you select rows in the VA report, so the data you see always matches your current selection.
* **Confirm** - filter changes are held until you click the **Apply** button. This is useful when editing, where an automatic reload would discard unsaved changes.
* **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.
A status indicator shows whether a filter change is pending, loading, or idle. In edit mode, a pending filter is held until you leave edit mode, so your unsaved edits are never lost.
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
+68 -9
View File
@@ -20,9 +20,76 @@ When features are requested, we will describe the work to be performed in the se
The following features are currently requested:
* Additional Validations
* Ability to set 'number of approvals' to zero, enabling instant updates (4 days)
* Ability to make automated submissions using an API
### Additional Validations
The following additional features are necessary:
* ~~Frontend Formulae~~ - **Delivered** in v7.13.0. See [Formula Rules](/dcc-validations/#formula-rules).
* Regex Rules - **Delivered**. See [Regex Rules](/dcc-validations/#regex-rules).
The above rules will apply only at frontend, and will be configurable in the MPE_VALIDATIONS table. The values will appear as part of the [editors/getdata](https://code.datacontroller.io/getdata_8sas_source.html) service response in the `dqrules` object.
**Frontend Formulae**
The plan here will be to introduce [hyperformula](https://hyperformula.handsontable.com/guide/demo.html) into HandsOnTable. It will allow a library of ~400 functions and advanced excel-like behaviour. It integrates natively [as a plugin with HandsOnTable](https://handsontable.com/docs/javascript-data-grid/formula-calculation/#available-functions).
The initial challenge will be that HyperFormula requires cell references to operate, eg:
|ITEM|PRICE|VOLUME|REVENUE|
|---|---|---|---|
|PAPER|4.20|100|`= B1 * C1`|
|PEN|61.02|1,971|`= B2 * C2`|
Whereas end users cannot know these references ahead of time. Therefore the references will be made using variable names, eg:
|ITEM|PRICE|VOLUME|REVENUE|
|---|---|---|---|
|PAPER|4.20|100|`= PRICE * VOLUME`|
|PEN|61.02|1,971|`= PRICE * VOLUME`|
The frontend can then perform replacement of the variables for each Formula cell. For instance, replacing ` PRICE ` with ` B1 ` and ` VOLUME ` with ` C1 ` in the first row (and with ` B2 ` and ` C2 ` in the second row respectively).
To avoid clashes with names that match function names (eg, `MATCH()`) each named variable **must have a leading and trailing blank**, and we should be sure to ignore variables inside of single or double quoted strings - eg ` ITEM & " string ITEM "` (would resolve to `A1 & "string ITEM "`).
There would be two types applied:
* `HARDFORMULA` -> Column is readonly
* `SOFTFORMULA` -> Column can be changed by the user
To enable conditional logic (eg, show the current user id if row is changed), we also need a new column in the EDIT grid, to show the edit status (Modified, Added, Deleted, Unchanged). This should be the first column, and should NOT be submitted to backend. We could display these values as icons, rather than letters.
These properties can be accessed using the following literals:
* DC.ROW_STATUS - replaced at runtime with the cell reference, eg A1 or A2. Values would be M, A, D, or U.
* DC.USER_NAME - replaced at runtime with the logged-in user id
* DC.ORIG_VALUE - replaced at runtime with the original cell value
An example of a rule value that intends to show the current user id if the row is changed:
```
RULE_VALUE= if( DC.ROW_STATUS != 'U', DC.USER_NAME, DC.ORIG_VALUE )
```
Which would translate to the following formula, after the page is loaded:
```
=if(A1!='U',"sasdemo","sasinstaller")
```
**Regex Rules**
There are two types of rule we can apply in the form of regular expressions:
* `HARDREGEX` -> If the value fails the rule, the data cannot be submitted (turns red)
* `SOFTREGEX` -> If the value fails the rule we change the cell colour to yellow (as a warning), but can still submit
### Set Approvals to Zero
The following changes are necessary to implement this feature:
@@ -169,12 +236,4 @@ It is now possible to restore any change by heading to the particular staged dat
This will submit a NEW change (which must first be approved) that will revert the table to state it was in just prior to the selected upload.
Note that Data Controller can only track (and revert) changes that are made using the Data Controller tool itself! It does not / cannot track changes made externally to a table, by other tools.
### Frontend Formulae
Delivered in v7.13.0. Formula columns (HARDFORMULA / SOFTFORMULA) are computed live in the editor using HyperFormula, with variable-name references resolved to row-relative cell references. See [Formula Rules](/dcc-validations/#formula-rules).
### Regex Rules
Delivered. HARDREGEX (blocking) and SOFTREGEX (warning) rules validate cell values against a Perl-style regular expression. See [Regex Rules](/dcc-validations/#regex-rules).
Note that Data Controller can only track (and revert) changes that are made using the Data Controller tool itself! It does not / cannot track changes made externally to a table, by other tools.