Field Validation in Grooper

From Grooper Wiki

"Field validation" refers to the various ways Grooper can warn users a Data Field or Data Column cell value may be inaccurate (e.g. invalid). Invalid fields are set to an error state, making it more obvious for reviewers something is wrong. The Data Viewer may also be configured such that the Review task cannot be completed until the error is resolved.

Ways to validate data in Grooper

There are several ways data in a Data Model is validated in Grooper:

  • The Data Field/Data Column's Value Type configuration validates data based on what type of information is expected (e.g. decimal values, datetime values, string values, or other types of values)
  • "Required" fields are considered invalid if no value is collected.
  • Is Valid expressions
  • Calculated Value expressions (when using "Validate" mode or "SetIfEmpty" mode and a value is present)
  • Database Lookups
  • Data Rules

Value Types

Required Fields

Is Valid expressions

Calculated Value expressions

Database Lookups

BE AWARE: Setting "Is Valid" expressions on a lookup field can be problematic. Set "Is Valid" expressions on target fields (or other fields in the Data Model) instead.

Grooper's validation logic has an order of operations that can make it seem like "Is Valid" expressions on lookup fields do not work. This is not really the case. Instead, the lookup's validation is taking priority.

Lookup validation presumes an error should be thrown if the lookup misses. In more nuanced scenarios, the results of the lookup need to be used to validate something based on some condition. "Is Valid" expressions are useful for validating data using conditional logic. However, they should not be configured on lookup fields.


For example, imagine a Database Lookup validating duplicate invoices.

  • The lookup checks to see if an invoice number is found in a database (lookup field = "InvoiceNo") and if it is sets the value of a Grooper field to "True" (target field = "Duplicate").
  • An "Is Valid" expression could be used to error a field when "Duplicate" is "True".
  • If set on "InvoiceNo", no error will appear. Why?
    • The lookup is successful.
    • No field is errored because the lookup did not miss. (Furthermore, no further validation is executed on the lookup field. Because lookups are always executed on field edit, it is most efficient to do things this way).
  • Instead, the "Is Valid" expression should be configured on the target field "Duplicate". This will properly error a field in Review.

Data Rules