feat: new validations
All checks were successful
Publish to docs.datacontroller.io / Deploy docs (push) Successful in 57s

This commit is contained in:
_
2026-02-15 23:49:13 +00:00
parent 965efacf70
commit f9daa7dfbb
2 changed files with 57 additions and 2 deletions

View File

@@ -23,7 +23,7 @@ The following resources contain additional information on the Data Controller:
- Data Controller flyer ([front](/marketing/flyer-front.pdf) / [back](/marketing/flyer-back.pdf)) - Data Controller flyer ([front](/marketing/flyer-front.pdf) / [back](/marketing/flyer-back.pdf))
- Data Controller [videos](/videos) - Data Controller [videos](/videos)
- Data Controller [SAS Code](https://code.datacontroller.io) - Data Controller [SAS Code](https://code.datacontroller.io)
- Data Controller [Download](https://4gl.uk/dcdeploy) - Data Controller [Download](https://git.datacontroller.io/dc/dc/releases)
## Product Features ## Product Features
@@ -42,7 +42,7 @@ Data Controller is regularly updated with new features. If you see something th
* [Row Level Security](/row-level-security) * [Row Level Security](/row-level-security)
* Excel [formula support](excel) * Excel [formula support](excel)
* Dynamic [cell dropdown](/dynamic-cell-dropdown) * Dynamic [cell dropdown](/dynamic-cell-dropdown)
* Works on ALL flavours of SAS (Foundation, EBI, Viya) * Works on ALL flavours of SAS (Base, EBI, Viya)

View File

@@ -20,9 +20,64 @@ When features are requested, we will describe the work to be performed in the se
The following features are currently requested: The following features are currently requested:
* Additional Validations
* Ability to set 'number of approvals' to zero, enabling instant updates (4 days) * Ability to set 'number of approvals' to zero, enabling instant updates (4 days)
* Ability to make automated submissions using an API * Ability to make automated submissions using an API
### Additional Validations
The following additional features are necessary:
* Frontend Formulae
* Regex Rules
* Custom Functions
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**
An example of a simple rule would be:
```sas
REVENUE = PRICE * VOLUME
```
How to apply this in Data Controller? Let's consider a table as follows:
|ITEM|PRICE|VOLUME|REVENUE|
|---|---|---|---|
|PAPER|4.20|100|`= PRICE * VOLUME`|
|PEN|61.02|1,971|`= PRICE * VOLUME`|
The plan here will be to introduce [hyperformula](https://hyperformula.handsontable.com/guide/demo.html) into HandsOnTable. We have confirmed with support, and it is included in our OEM plan. It will allow a library of ~400 functions and advanced excel-like behaviour.
HyperFormula requires cell references to operate (rather than named variables), eg as follows:
|ITEM|PRICE|VOLUME|REVENUE|
|---|---|---|---|
|PAPER|4.20|100|`= B1 * C1`|
|PEN|61.02|1,971|`= B2 * C2`|
For ease of use, and to avoid the need to hard code a particular column order, the frontend should 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**.
There would be two types applied:
* `HARDFORMULA` -> Column is readonly
* `SOFTFORMULA` -> Column can be changed by the user
**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
**Custom Functions**
There may be a requirement to implement a non-standard function, eg to return the value of the logged in user. For that we can implement a validation rule named `CUSTOMFUNC`. These functions will be built / tested / documented and packaged by the Data Controller team and shipped inside the product.
### Set Approvals to Zero ### Set Approvals to Zero