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

Saturday, August 11, 2007

Example 37: Using "Control" attribute at Menu definition level

This post illustrates how to use "Control" attribute at menu-definition level.

Download TDL37


;;Objective:-
;;Using "Control" attribute at Menu level
;;=========================================================================

;;Global formula definition
[System: Formula]
locSR : $$LocaleString:"Sales Register"
locPR : $$LocaleString:"Purchase Register"

;;Add a new menu-item to the Gateway of Tally
[#Menu:Gateway of Tally]
Item : Example 37: Menu : My Menu

[Menu: My Menu]

;;1st Menu option
Item: @@locSR : Display : Sales Register

;;2nd Menu option.
Item: @@locPR : Display : Purchase Register

Item: Blank
Key Item: @@locQuit

Control : @@locSR : ##ShowSR
Control : @@locPR : ##ShowPR

[System: Variable]
ShowSR : Yes

;;This will hide the 2nd menu-option
ShowPR : No

[Variable: ShowSR]
Type : Logical

[Variable: ShowPR]
Type : Logical

Notes:-
1) We are using ITEM to define menu-items rather than using KEY ITEM
This is because KEY ITEM is supported in only Tally 9, whereas
ITEM is supported in both Tally 7.2 and Tally 9

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