Row Validation Pack is a simple pack that allows defining the list of all the mandatory fields of any table and it returns the validation result with a set of useful attributes.
Often we need to check for the consistency of our data and display invalid data to the user or even prevent actions id some requirements are not met. Most of the times this is just a matter of missing data, i.e. mandatory fields that are not provided in the lifecycle of the row.
While the definition of the mandatory fields is obviously specific for each table, the validation logic is the same every time. However, in a pure formula solution, we need to replicate the checks and validation UI for all the tables.
This packs decouples the definition and the validation, allowing to have a consistent output and focus only in the fields requirements.
Validation : it's a column type and it shows the outcome of pack validation along with its attributes
ColumnList() : the formula to be used inside the Validation column to add pairs of string, column
Validate() : this is the function called by the Validation column and it is not required to be directly used
Install the Row Validation Pack
Add a Validation column type to the tables(s) you want to check
in the Validation column, add the ColumnList() formula, providing pairs of column names and column values. such as:
// You can omit the implicit "thisRow." in the field values
Unfortunately, we cannot access column metadata information (such as column name) formulaically, unless we use Coda API. Therefore, in order to have useful information for the user (e.g. what columns are missing), we have to explicitly provide column name and this is prone to potential naming discrepancy if we later change column name and we don't update the ColumnList() formula.
Want to print your doc? This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (