Table of Contents

 

Menu

A software needs to present a structured set of options on the Tally interface, helping users navigate to reports, forms, or actions without relying on shortcuts or memorisation. The Menu definition helps achieve this by allowing options to be structured, regrouped, and organised into sub-menus, making navigation more user-friendly. It provides a guided way to access functionality, ensuring that options appear in the right context and in a logical sequence. By using Menu definitions, developers can simplify navigation, improve discoverability, and create a clearer, more intuitive user experience.

Syntax

[Menu : <Menu Name]

Example

[Menu: TSPL Menu]

 

➥ Click here to download the Menu Sample

Attributes

Menus with multiple options may require quicker access to specific reports or actions without depending on automatically assigned hotkeys. Key Item is an attribute used to add an item to a menu and link it to a report or another menu, similar to the Item attribute. The key difference is that it also allows developers to explicitly define a hotkey for the displayed menu item, giving better control over navigation and accessibility. By using Key Item, developers can create more user-friendly menus with faster and more predictable keyboard navigation.

Syntax

Key Item : <Item Name>:<Hot Key>:<Action>:<Action Parameter>

<Item Name> Display name of the Menu item
<Hot Key> The single alphabet which is a part of the display name, that acts as a hot key to invoke the action associated with the Menu item
<Action>:<Action Parameters> The action and respective parameters which specifies the action to be performed when the menu item is invoked

Example

[#Menu: Gateway of Tally]
Add : Item : New Menu: Menu : TSPL Menu

[Menu: TSPL Menu]
Key Item : Daybook Report : D: Display : Daybook

Explanation

The example here adds a new menu item with display name New Menu in the default menu Gateway of Tally. When the user selects New Menu, it opens another menu called TSPL Menu. Within this menu, a menu item with display name Daybook Report is listed via the attribute Key Item, with the hot key D, which opens the report Daybook, via the action Display which takes report name DayBook as the parameter. The action is invoked, when user presses the letter D on the keyboard or clicks or presses enter on the menu item. This shows how the Add and use Key Item attribute is used to introduce new menu entries with hot key and navigate between menus and reports.

Menus are useful only when they provide clear paths to reports, displays, actions, or further options. Item is an attribute used to add a new entry to a menu and link it directly to a report, display, or another menu. It defines what should open or execute when the user selects that option. Since there is no separate provision to define a hotkey for an Item, the system automatically assigns the next available hotkey from the menu. By using Item, developers can create structured and easy-to-navigate menus. Want to provide your own hotkey? Refer to the Key Item attribute.

Syntax

Item: <Item Name> :<Action>:<Action Parameters>

<Item Name> is the display name of the menu item
<Action>:<Action Parameters> is the action with corresponding parameters, performed when the menu item is invoked.

Example

[#Menu: Gateway of Tally]
Add : Item : New Menu: Menu : TSPL Menu

[Menu: TSPL Menu]
Item : Daybook Report : Display : Daybook

Explanation

The example here adds a new menu item with display name New Menu in the default menu Gateway of Tally. When the user selects New Menu, it opens another menu called TSPL Menu. Within this menu, a menu item with display name Daybook Report is listed via the Item attribute, which opens the report Daybook, via the action Display which takes report name DayBook as the parameter. This shows how the Add and Item attribute is used to introduce new menu entries and navigate between menus and reports.

Menus in pop-up, i.e. drops from the top; interfaces may require both visible navigation options and direct keyboard-based access for faster operation. Key is an attribute used to associate a menu item with a separate Key definition, where the actual shortcut key combination and its behavior are defined. The Key attribute works by linking the menu to a reusable Key definition that contains details such as the key combination, action to execute, and conditions under which the shortcut should remain active or inactive. This approach provides better control and flexibility, allowing developers to offer powerful keyboard-driven actions without cluttering the menu interface.

Syntax

Key: <Name of menu item>: <Key Definition>

<Name of menu item> is the menu item to which you want to assign the hotkey.
<Key Definition> is the name of the key that holds the key combination

Example

[#Menu: Gateway of Tally]
Add : Item : New Menu: Menu : TSPL Menu

[Menu: TSPL Menu]
Item : Daybook Report : Display : Daybook
Key  : Daybook Report : D

The example here adds a new menu item with display name New Menu in the default menu Gateway of Tally. When the user selects New Menu, it opens another menu called TSPL Menu. Within this menu, a menu item with display name Daybook Report is listed via the attribute Key Item, which opens the report Daybook, via the action Display which takes report name DayBook as the parameter.  The menu item is assigned the hot key D via the attribute Key. The action is invoked, when user presses the letter D on the keyboard or clicks or presses enter on the menu item. This shows how the Key attribute is used to assign hot key to a menu item and navigate between menus and reports.

Menus become easier to navigate and understand when they display clear and meaningful names to users. Title is an attribute used in a Menu definition to specify the name displayed for the menu on the interface. It determines how the menu appears to users while navigating through different options and sections in the application. By using appropriate Titles, developers can make menus more intuitive, improve readability, and help users quickly identify the purpose of each menu without confusion.

Syntax

Title : <Title Name>

<Title Name> is the name of the Title user want to add to the Menu

Example

[Menu: TSPL Menu]
Title : “Custom Reports”
Item  : Custom Report : Display : TSPL Report

Explanation

This example creates a new Menu with menu definition TSPL Menu. The menu has the title ‘Custom Reports’ displayed on top of the menu, via the attribute Title. It also has a menu item with display name Custom Report added via the attribute Item, that displays the custom report TSPL Report specified using the action Display with the parameter of Report name TSPL Report. This shows how menus can be created with appropriate titles to indicate the purpose of the menu.

Menus with multiple options can sometimes appear crowded and difficult to understand, especially when related items are not visually grouped together. Indent is an attribute used to provide a text title that helps group related menu line items under a common heading, improving readability and clarity for users. It creates a visual separation between sections in the menu, making it easier to identify the purpose and usage of the items listed under each group. By using Indent, developers can organise menus in a more structured and user-friendly manner

Syntax

Indent : <Label>

<Label> is the text used as a heading to group menu items

Example

[Menu: TSPL Menu]

    Title : “Custom Reports”
Indent: “Stock Reports”
Item  : Custom Stock Report : Display : TSPL Stock

Explanation

This example creates a new Menu with definition name TSPL Menu. The menu displays a title ‘Custom Reports’ on the top specified via the attribute Title. Further, the menu has a indent with label ‘Stock Reports’ specified via the attribute Indent and a menu item specified using attribute Item with display name Custom Stock Report that displays a report named TSPL Stock via the action Display. This shows the usage of indent labels that makes the menu more organised and readable.

In interfaces with multiple menus and sections, a plain menu border may sometimes make the screen look flat and reduce visual distinction between elements. Border 3D is an attribute used to apply a three-dimensional border effect to a menu, giving it a more prominent and visually separated appearance on the screen. It works by accepting a logical value of Yes or No, which determines whether the 3D effect should be enabled or disabled for the menu. By using Border 3D, developers can improve the visual presentation of menus and make important interface sections stand out more clearly without changing their functionality.

Syntax

Border 3D: <Logical Formula>

<Logical Formula> is a formula that returns Yes or No, determining whether the border should be displayed in 3D.

Example

[Menu: TSPL Menu]

   Border3D : Yes

Explanation

This example applies a 3D border to the new Menu TSPL Menu. When the attribute Border3D is set to Yes, the menu is displayed with a raised 3D border, visually enhancing the menu layout.

When you want to add buttons at the bottom of a menu, this attribute helps you define them. These buttons appear at the bottom bar of the menu when it is triggered and can be used to provide shortcuts for quick actions. The attribute is linked with a Button Definition, which specifies the actual behavior of that button. One can assign it a Title and even a shortcut key so users can activate it instantly.

Syntax

Bottom Button: <Button Name>

<Bottom Button Name> is the name given by the user for the bottom button added in the menu

Example

[#Menu: Gateway of Tally]
Bottom Button: TSPL Bottom Button

[Button: TSPL Bottom Button]
Title : “TSPL Bottom Button”
Key   : Alt + B

Explanation

This example defines a bottom button TSPL Bottom Button in the Gateway of Tally menu with the label TSPL Bottom Button via the attribute Bottom Button. The button is assigned the shortcut key Alt + B, making it easier for users to trigger the action directly.

When you want to add custom actions inside menus, the Button attribute is your go-to. This attribute lets you list the buttons that will appear at the top bar whenever the menu is triggered. Think of it like adding quick-access options for users to perform actions directly from the menu without diving deep into multiple screens.
The attribute is linked with a Button Definition, which specifies the actual behavior of that button. One can assign it a Title and even a shortcut key so users can activate it instantly.

Syntax

Button: <Button Name>

<Button Name> is the name given by the user for the button added in the menu

Example

[#Menu: Display Menu]
Button : TSPL Menu Button

[Button: TSPL Menu Button]
Title  : “Open TSPL Report”
Key    : Alt + B
Action : Display : TSPL Report

This example adds a button TSPL Menu Button on the right button bar of the default menu Display Menu, via the attribute Button specified in the menu. This button is assigned the key Alt+B and is displayed as ‘Open TSPL Report’ which displays the custom report TSPL Report via action Display. This example shows how buttons can be added to Menus to provide quick access to actions related to reports and processes.

In many scenarios, certain menu options are relevant only under specific conditions, such as when a company is loaded, a feature is enabled, or a user has the required access rights. Displaying all options all the time can make menus confusing and cluttered. Control is an attribute used to manage the visibility of a specific menu item based on a defined condition. It works by evaluating a logical expression at runtime and deciding whether the item should be displayed or hidden. If the condition is not satisfied, the menu item remains inaccessible because it is not shown on the screen. By using Control, developers can create cleaner, context-aware menus that guide users toward valid actions while reducing unnecessary options.

Syntax

Control : <Name of Menu Item> : <Logical Condition>

<Name of Menu Item> is the name of the item in the menu.
<Logical Condition> is a condition that returns Yes or No to decide whether the menu item should be displayed.

Example

[Menu: TSPL menu]
Key Item : @@locTSPLStockSummary : S : Display : StockSummary
Control  : @@locTSPLStockSummary : $$IsCmpOwner

[System: Formula]
locTSPLStockSummary : $$LocaleString:”StockSummary”

This example defines a new menu TSPL Menu which lists a menu item with display name ‘Stock Summary’ specified using the system formula locTSPLStockSummary . The menu item displays Stock Summary specified via the action Display. The visibility of the Stock Summary menu item is controlled via the attribute Control. The item is displayed only if the current user is the Company Owner. If the condition evaluates to No, the menu item is completely hidden. This demonstrates how Control is used to restrict menu access based on conditions.

Menus with plain backgrounds can sometimes make the interface look flat and visually monotonous, especially when multiple sections and options are displayed on the screen. Gradient is an attribute used to enhance the appearance of a menu by applying a smooth shading effect instead of a plain background. It works by evaluating a logical formula that determines whether the gradient effect should be applied at runtime, allowing the appearance to change dynamically based on conditions. By using Gradient, developers can create menus that look more polished and visually engaging while still maintaining flexibility and control over the interface design.

Syntax

Gradient: <Logical Formula>

<Logical Formula> is a formula that returns Yes or No, determining whether the gradience should be displayed to the menu.

Example

 [#Menu: Gateway of Tally]
Gradient: No

This Example modifies the default menu Gateway of Tally and disables the Gradience for the menu via the attribute Gradient.

Complex conditions written directly within menu attributes can become lengthy, difficult to read, and harder to maintain. Local Formula is used to define formulas locally within a Menu so that such conditions can be simplified and managed more effectively. Developers can create multiple Local Formula definitions for smaller logical checks and combine them using logical operators to form more complex conditions wherever required, such as in the Control attribute. Since the scope of a Local Formula is limited to the current definition, it helps keep the logic organised, readable, and easier to maintain without affecting other parts of TDL.

Syntax

Local Formula :<Local formula name>:<Expression>

<Local Formula Name> is a name you assign to the local formula.
<Expression> is a calculation or logic the formula should evaluate.

Example

[Menu: TSPL Menu]
Add : Item    : @TSPLShortcut : Display: StockSummary
Local Formula : TSPLShortcut  : $$LocaleString:”SS Report”

Explanation

This example creates a new Menu TSPL Menu which has a menu item added with the display name ‘SS Report’. This display name is referred by using the Local Formula TSPLShortcut specified in the menu definition. When this menu item is invoked, it displays the default report StockSummary specified via the action Display.

Here, a local formula named TSPLShortcut is defined within the menu.
The formula returns the string “SS”, which is then used as the caption for the menu item.
This allows the menu item name to be dynamically derived using a local formula, without defining it globally.

Is this information useful?
YesNo
TallyHelpwhatsAppbanner
Is this information useful?
YesNo
TARA