Tally ERP 9 | Tally 9 | Tally 8.1 | Tally 7.2 | Tally 6.3 | Learn Tally TDL

Thursday, August 9, 2007

Example 33: Using "Control" Attribute at FIELD definition level

This post illustrates how to use "Control" Attribute at FIELD definition level.

Download TDL33

;; Add a new menu-item to the Gateway of Tally. Note that the Action is
;; ALTER (and not display as used generally)

[#Menu:Gateway of Tally]
Item : Example 33 : Alter : My Report

[Report: My Report]
Form: My Form

[Form: My Form]
Part: My Part

[Part: My Part]
Line: My Line

[Line: My Line]
Fields: My Field1

[Field: MyField1]
Use: Name Field

;;Display a message if the Field Value is Empty
Control : EmptyValueMsg : $$IsEmpty:$$Value

;;Global formula
[System: Formula]
EmptyValueMsg : $$LocaleString:"Cannot be empty.\nPlease enter some value."
$$IsEmpty checks whether the parameter passed is Empty or not.
Syntax: $$IsEmpty:
2) $$Value
Returns the value of the current field
3) \n is used for line-feed

Tally; Tally Developer and Tally Definition Language are trademarks or registered trademarks of "Tally Solutions FZ LLC", Bangalore.