Record audit and errors
Every attempt to write a record — successful or not — produces a record audit entry. This is how Grunddata tells you what happened, and it is the same mechanism behind the error messages you see in the web app, the Excel plugin and the Google Sheets add-on.
What an audit entry contains
Section titled “What an audit entry contains”| Field | Description |
|---|---|
| Status | success or error |
| Message | A human-readable explanation |
| Operation | insert, update or delete |
| Table | Which table the attempt was against |
source_id / version |
Which record and which revision |
Code / Name |
So you can identify the row without decoding a UUID |
| Data | The values that were attempted |
| Attempted by / at | Who tried, and when |
What happens on failure
Section titled “What happens on failure”Per surface:
- Web app — the record dialog stays open and shows the message inline. Fix and save again.
- Excel plugin / Google Sheets — the upload reports back which rows failed and why. Your valid rows in the same upload are still processed; the failed ones are not.
- API — the response contains a
record_auditsarray with an entry per record.
Common errors and how to fix them
Section titled “Common errors and how to fix them”“Required” / missing value
Section titled ““Required” / missing value”An attribute marked required had no value.
Value not found in domain table
Section titled “Value not found in domain table”The value in a domain attribute could not be resolved to a record in the target table.
Usual causes:
- The lookup value does not exist yet. Add it to the domain table first.
- A typo, or trailing whitespace in a spreadsheet cell.
- The value was typed by hand instead of chosen from the picker.
- The domain table record was deleted.
Uniqueness violation
Section titled “Uniqueness violation”Another record already holds this value on an attribute marked unique.
Max length exceeded
Section titled “Max length exceeded”The string is longer than the attribute’s max length. Either shorten the value or increase the max length on the attribute.
Validation rule failed
Section titled “Validation rule failed”A validation rejected the value — a pattern, a range, a list membership, or a table-level comparison between two attributes.
The message names the rule that failed. If the message is cryptic, the rule probably needs a clearer description on the attribute.
Wrong datatype
Section titled “Wrong datatype”Text in a numeric column, or a date in a format that could not be parsed.
Validating a whole table at once
Section titled “Validating a whole table at once”Rather than discovering problems one upload at a time, you can run the current validation rules against every record in a table. The result reports:
- The total number of records checked.
- How many are valid.
- How many are invalid.
- A sample of failures, each with the record’s
Code,Nameand the specific messages.
A workflow for fixing bad data in bulk
Section titled “A workflow for fixing bad data in bulk”-
Run the table validation check and note the failing records.
-
Download the table into Excel or Google Sheets.
-
Correct the failing rows. Leave the hidden identifier columns untouched so the rows are recognised as updates, not new records.
-
Upload with a commit message that says what you fixed and why, for example
Correct 40 accounts failing the new account_number pattern. -
Re-run the validation check to confirm you are clean.