Data validation and controls in Tally can be done at two levels, either at the Platform level or at the TDL level. TDL Programmers do not have control over any of the Platform level validations. TDL
Programmers can only add validation and controls at the TDL Level. Let us understand some of the TDL Level validation and control mechanisms.
Field Level Attribute — Validate
This attribute checks if the given condition is satisfied. Unless the given condition for ‘Validate’ is
satisfied, the user cannot move further, i.e., the cursor remains placed on the current field without moving to the subsequent field. It does not display any error message.
Syntax
Validate : Logical Formula
Example
[Field: CMP Name]
Use : Name Field
Validate : NOT $$IsEmpty:$$Value
Storage : Name
Style : Large Bold
In this example:
Programmers can only add validation and controls at the TDL Level. Let us understand some of the TDL Level validation and control mechanisms.
Field Level Attribute — Validate
This attribute checks if the given condition is satisfied. Unless the given condition for ‘Validate’ is
satisfied, the user cannot move further, i.e., the cursor remains placed on the current field without moving to the subsequent field. It does not display any error message.
Syntax
Validate : Logical Formula
Example
[Field: CMP Name]
Use : Name Field
Validate : NOT $$IsEmpty:$$Value
Storage : Name
Style : Large Bold
In this example:
- The field CMP Name is a field in Default TDL which is used to create/ alter a Company.
- Attribute ‘Validate’ stops the cursor from moving forward, unless some value is entered in the current field.
- The function $$IsEmpty returns a logical value as TRUE, only if the parameter passed to it contains NULL.
- The function $$Value returns the value entered in the current field.
Thus, the Attribute ‘Validate’, used in the current field, controls the user from leaving the field blank, and forces a user input.
Skip to main content