Intercept/change DB error message
Posted: Tue 16 Apr 2019 15:01
Please consider a grid with 2 columns (simplified). The first column is a 'lookup' column ("Name") while the second is a required field (ID Number).
Column A is used to select a 'Name' from a DB Lookup list and fill the associated ID Number into the second Column: "ID Number". Note that the actual value for "Name" does not have an underlying Field component in this table - column A just exists to get the ID Number and enter it in the table.
If one tries to post a record without selecting the 'Name' (and hence adding the ID number into the ID number field), one gets the error message "Field "ID Number" must have a value".
This could, of course, be confusing to the end user as the field they're entering is "Name" - not "ID Number" (especially if the ID number is not visible in the grid) ....
How can one intercept the database error mechanism to change the error message to "Field "Name" must have a value" to avoid confusion when the ID Number Field is null?
Column A is used to select a 'Name' from a DB Lookup list and fill the associated ID Number into the second Column: "ID Number". Note that the actual value for "Name" does not have an underlying Field component in this table - column A just exists to get the ID Number and enter it in the table.
If one tries to post a record without selecting the 'Name' (and hence adding the ID number into the ID number field), one gets the error message "Field "ID Number" must have a value".
This could, of course, be confusing to the end user as the field they're entering is "Name" - not "ID Number" (especially if the ID number is not visible in the grid) ....
How can one intercept the database error mechanism to change the error message to "Field "Name" must have a value" to avoid confusion when the ID Number Field is null?