USER DEFINED QUERY BOX TDLByte #18 Dear Developers, The 'Query Box' that we have seen till now in Tally.ERP 9 has only 2 options i.e. Yes or NOby default. From Tally.ERP 9 Release 5.0, it is possible to customize the look, options and position of the Query box with the introduction of the new definition type 'Query Box'. Using this definition, multiple options can be provided including a shortcut key to select each option, and text to explain the implication of each option in the query box. This definition has various attributes to control the query behavior, and an associated option for users to select. Let us understand the concept of the user defined query box using the default code. User defined query box is used in Default Taxation code of Tally.ERP 9 Release 5.0, which is shown below. The Query Box Definition This is the query box which is called at voucher accept when the tax details are modified for any taxation type and the current user is authorized to override the tax details. The Look of the Query Box Explaining Query Box Alignment & Background: This query box will be aligned at the Right Bottom with no Gray Background as specified by the attributes Queries: Since 3 Queries are mentioned in the Query Box Definition, 3 Queries are seen in the Query Box Displayed. Default: This attribute tells the system which value has to be assigned when the key "Enter" and "Esc" is pressed respectively Invoking Query Box Action Control Ex Release 5.0 introduces a new form Attribute Control Ex that can invoke the defined Query Box, and control the behavior of the Form. The selected response can be held in a variable. The following is a code snippet from the default code of Tally.ERP 9 Release 5.0. Procedural Action Query Box Ex Release 5.0 has introduced a new procedural action 'Query Box Ex' which invokes the User defined Query Box in the Function, like the following Example Collection of the selected response When Control Ex is used In case The Query Box is invoked from Form attribute 'Control Ex' then the selected response is collected in the variable specified. In the above case 'vVchSelectedIndex' will hold the selected response. When Query Box Ex is used In case the Query Box is invoked by Procedural Action 'Query Box Ex' then the selected response can be accessed by using the function â€˜$$LastResultâ€™. Based on this value, further actions can be performed. The following example will display a message box with the selected response from the Query box options. Likewise user defined Query Box can be designed to suit the requirements. Stay tuned!