docs: document v7.13.0 features
- Live formulas (HARDFORMULA/SOFTFORMULA) in dcc-validations with operator-friendly explanations - 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 - ViewBoxes: document edge/corner drag resizing - Licensing: combined-key paste, key preview, protocol warning - 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 improvements, deploy checks, login page UX - Index page: add live formulas and VA embed to features list
This commit is contained in:
+46
-1
@@ -23,7 +23,7 @@ It is possible to configure a number of other rules by updating the MPE_VALIDATI
|
||||
|
||||
## Configurable Checks
|
||||
|
||||
Check back frequently as we plan to keep growing this list of checks.
|
||||
Check back frequently as we keep growing this list of checks.
|
||||
|
||||
|Rule Type|Example Value |Description|
|
||||
|---|---|---|
|
||||
@@ -35,6 +35,8 @@ Check back frequently as we plan to 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.|
|
||||
|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.|
|
||||
@@ -43,6 +45,49 @@ Check back frequently as we plan to keep growing this list of checks.
|
||||
|[SOFTSELECT_HOOK](/dynamic-cell-dropdown)|/physical/path/program.sas|A SAS service (STP or Viya Job) or a path to a SAS program on the filesystem. User-provided values may (or may not) be in this list. Cannot be used alongside a HARDSELECT_HOOK.|
|
||||
|
||||
|
||||
## 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.
|
||||
|
||||
### Writing a formula
|
||||
|
||||
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:
|
||||
|
||||
```
|
||||
= 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.
|
||||
|
||||
!!! 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. Text inside quotes is left as-is.
|
||||
|
||||
### 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.
|
||||
|
||||
### Editor behaviour
|
||||
|
||||
* When you paste a formula into the grid, column names are automatically translated so the formula works in its new position.
|
||||
* A cell that has been 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".
|
||||
|
||||
### Special values
|
||||
|
||||
Formulas can reference three special values that are resolved at runtime:
|
||||
|
||||
* `DC.ROW_STATUS` - the current state of the row: `M` (Modified), `A` (Added), `D` (Deleted), or `U` (Unchanged).
|
||||
* `DC.USER_NAME` - the logged-in user id.
|
||||
* `DC.ORIG_VALUE` - 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 )
|
||||
```
|
||||
|
||||
|
||||
## Regex Rules
|
||||
|
||||
HARDREGEX and SOFTREGEX validate cell values against a SAS (Perl-style) regular expression provided in `RULE_VALUE` - the same syntax accepted by [PRXPARSE](https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lefunctionsref/p0s9ilagexmjl8n1u7e1t1jfnzlk.htm).
|
||||
|
||||
Reference in New Issue
Block a user