Validation at line level is a flexible way to require additional manual validation during picking or receiving
The two main methods are validation with and without input.
Validation without input requires an extra verification in the form of a scan or approval by pressing a button. Validation without input comes in several variants:
- validate - Validate the value as identical
- validateMin - Validate the value as a minimum
- validateMax - Validate the value as a maximum
- validateMinDate - Validate the minimum date
- validateMaxDate - Validate the maximum date
In the query, it is set up by type, followed by an underscore and the name of the validation.
For example: validate_Location og validateMinDate_Expirydate
An example to require validation of location based on the product number as shown in the picture above.
case when pl.productno = '2005' then pl.location else '' end validate_location,
There are two variants of validation with input:
- validateInput - applies to all lines
- validateBatchInput - applies to batch level
Validation with input requires an input that is consistent with the criteria set in the query.
This can be either scanned or typed in. Validation with input, in practicality, works differently because the criteria can be set either as something static or as a regular expression (RegEx).
With a regular expression, the validation will approve any input that matches the pattern defined by the expression.A few random examples:
-
'^.+$' - any input as long as something is typed in.
- '^[0-9]{5}$' - requires 5 digits between 0 and 9.
- '^[A-Za-z]{3}$' - requires 3 letters between A-Z. Accepts both upper and lowercase letters.
- '^[A-Z]+$' - any number of uppercase letters bwetween A-Z.
Example of validateBatchInput_Serialno for a serial number-controlled item with arbitrary input:
case when pl.productno = '9991' then '^.+$' else '' end ValidateBatchInput_serialno,
When using validation with input, the finished input value will be stored separately with the name of the field. For example, validateInput_serialno will just be named "serialno".
All variants of the line validation can be used together or multiple times as desired. The completed line will be marked green with the input visible if applicable.