Field Level Attribute — Unique
This attribute takes a logical value. If it is set to Yes, then the values keyed in the field have to be unique. If the entries are duplicated, an error message Duplicate Entry pops up. This attribute is useful when a Line is repeated over UDF/Collection, in order to avoid a repetition of values.
Syntax
Unique: [Yes / No]
Example
[!Field: VCHPHYSStockItem]
Table : Unique Stock Item : $$Line = 1
Table : Unique Stock Item, EndofList
Unique: Yes
In this code snippet, the field VCHPHYSStockItem is an optional field in DefTDL, which is used in a Physical Stock Voucher. The attribute Unique avoids the repetition of Stock Item names.
Field Level Attribute — Notify
It is similar to attribute ‘Validate’. The only difference is that it flashes a warning message and the cursor moves to the subsequent field. A system formula is added to display the warning message.
Syntax
Notify : System Formula : Logical Condition
Example
[!Field: VCH NrmlBilledQty]
Set as : if @@HasInvSubAlloc then $$CollQtyTotal: +
BatchAllocations : $BilledQty else @ResetVal
Skip On : @@HasInvSubAlloc
Style : if @@IsInvVch then "Normal" else "Normal Bold"
Notify : NegativeStock:##VCFGNegativeStock AND +
@@IsOutwardType AND$$InCreateMode AND +
$$IsNegative:@@FinalStockTotal
Here, VCH NrmlBilledQty is a default optional field in TDL used in a Voucher. ‘Notify’ pops up a
warning message, if the entered quantity for a stock item is more than the available stock, and the
cursor moves to the subsequent field.
Field Level Attribute — Control
The attribute ‘Control’ is similar to Notify. The only difference is that it does not allow the user to
proceed further after displaying a message. The cursor does not move to the subsequent field.
Syntax
Control : System Formula : Logical Condition
Example
[Field: VCH Number]
Use : Voucher Number Field
Inactive : @@NoVchNumbering
Skip On : @@AutoVchNumbering
Control : DuplicateNumber : @@NoDupVchNumbering AND +
(NOT $$InAlterMode OR NOT @SameVchTypeAndNum)AND +
$$IsDuplicateNumber:$$Value:
SameVchTypeAndNum : $VoucherTypeName = ##ORIGVchType AND +
$$Value = ##ORIGVchNum
Validate : (@@NoDupVchNumbering AND NOT $$IsEmpty:$$Value) +
OR NOT @@NoDupVchNumbering
Keys : PrevVchNumber
In this example, the field, VCH Number is a default field in TDL, used in a Voucher. The duplication
of voucher numbers for a particular voucher type is prevented by using the attribute Control. The differences between the field attributes Validate, Notify and Control are:
Form Level Attribute — Control
This attribute achieves a higher level of control on the contents of a Form, compared to the other
controls used at the Lower levels of the Form. If the condition specified with ‘Control’ is not satisfied, then the Form displays an error message while trying to save. The Form cannot be saved
until the condition in the attribute ‘Control’ is fulfilled.
Syntax
Control : String Formula : Logical Formula
Example
[Form: Voucher]
Control : DateBelowBooksFrom : $Date < +
$BooksFrom:Company :##SVCurrentCompany
Control : DateBelowFromDate : $Date < $$SystemPeriodFrom
Control : DateBeyondToDate : $Date > $$SystemPeriodTo
In this example, Voucher is a default Form. While creating a voucher, the attribute Control does not accept dates beyond the financial period or before beginning of the books.
Menu Level Attribute — Control
The attribute Control restricts the display of Menu Items, based on the given condition.
Syntax
Control : Item Name : Logical condition
Example
[!Menu: Gateway of Tally]
Key Item : @@locAccountsInfo : A : Menu : Accounts Info. : NOT +
$$IsEmpty:$$SelectedCmps
Control : @@locAccountsInfo : $$Allow:Create:AccountsMasters OR +
$$Allow:Alter:AccountsMasters
Here, the menu item Accounts Info will be displayed only if the condition is satisfied. $$Allow checks if the current user has the rights to access the report displayed under the current Menu item. The value Accounts Masters has been derived from attribute ‘Family’ at ‘Report’ definition.
This attribute takes a logical value. If it is set to Yes, then the values keyed in the field have to be unique. If the entries are duplicated, an error message Duplicate Entry pops up. This attribute is useful when a Line is repeated over UDF/Collection, in order to avoid a repetition of values.
Syntax
Unique: [Yes / No]
Example
[!Field: VCHPHYSStockItem]
Table : Unique Stock Item : $$Line = 1
Table : Unique Stock Item, EndofList
Unique: Yes
In this code snippet, the field VCHPHYSStockItem is an optional field in DefTDL, which is used in a Physical Stock Voucher. The attribute Unique avoids the repetition of Stock Item names.
Field Level Attribute — Notify
It is similar to attribute ‘Validate’. The only difference is that it flashes a warning message and the cursor moves to the subsequent field. A system formula is added to display the warning message.
Syntax
Notify : System Formula : Logical Condition
Example
[!Field: VCH NrmlBilledQty]
Set as : if @@HasInvSubAlloc then $$CollQtyTotal: +
BatchAllocations : $BilledQty else @ResetVal
Skip On : @@HasInvSubAlloc
Style : if @@IsInvVch then "Normal" else "Normal Bold"
Notify : NegativeStock:##VCFGNegativeStock AND +
@@IsOutwardType AND$$InCreateMode AND +
$$IsNegative:@@FinalStockTotal
Here, VCH NrmlBilledQty is a default optional field in TDL used in a Voucher. ‘Notify’ pops up a
warning message, if the entered quantity for a stock item is more than the available stock, and the
cursor moves to the subsequent field.
Field Level Attribute — Control
The attribute ‘Control’ is similar to Notify. The only difference is that it does not allow the user to
proceed further after displaying a message. The cursor does not move to the subsequent field.
Syntax
Control : System Formula : Logical Condition
Example
[Field: VCH Number]
Use : Voucher Number Field
Inactive : @@NoVchNumbering
Skip On : @@AutoVchNumbering
Control : DuplicateNumber : @@NoDupVchNumbering AND +
(NOT $$InAlterMode OR NOT @SameVchTypeAndNum)AND +
$$IsDuplicateNumber:$$Value:
SameVchTypeAndNum : $VoucherTypeName = ##ORIGVchType AND +
$$Value = ##ORIGVchNum
Validate : (@@NoDupVchNumbering AND NOT $$IsEmpty:$$Value) +
OR NOT @@NoDupVchNumbering
Keys : PrevVchNumber
In this example, the field, VCH Number is a default field in TDL, used in a Voucher. The duplication
of voucher numbers for a particular voucher type is prevented by using the attribute Control. The differences between the field attributes Validate, Notify and Control are:
Form Level Attribute — Control
This attribute achieves a higher level of control on the contents of a Form, compared to the other
controls used at the Lower levels of the Form. If the condition specified with ‘Control’ is not satisfied, then the Form displays an error message while trying to save. The Form cannot be saved
until the condition in the attribute ‘Control’ is fulfilled.
Syntax
Control : String Formula : Logical Formula
Example
[Form: Voucher]
Control : DateBelowBooksFrom : $Date < +
$BooksFrom:Company :##SVCurrentCompany
Control : DateBelowFromDate : $Date < $$SystemPeriodFrom
Control : DateBeyondToDate : $Date > $$SystemPeriodTo
In this example, Voucher is a default Form. While creating a voucher, the attribute Control does not accept dates beyond the financial period or before beginning of the books.
Menu Level Attribute — Control
The attribute Control restricts the display of Menu Items, based on the given condition.
Syntax
Control : Item Name : Logical condition
Example
[!Menu: Gateway of Tally]
Key Item : @@locAccountsInfo : A : Menu : Accounts Info. : NOT +
$$IsEmpty:$$SelectedCmps
Control : @@locAccountsInfo : $$Allow:Create:AccountsMasters OR +
$$Allow:Alter:AccountsMasters
Here, the menu item Accounts Info will be displayed only if the condition is satisfied. $$Allow checks if the current user has the rights to access the report displayed under the current Menu item. The value Accounts Masters has been derived from attribute ‘Family’ at ‘Report’ definition.
Skip to main content