Whats new in the latest Tally Developer and whats new in TDL ?
In this release there are enhancements in User Defined Functions, Collections and Actions.
This document describes in detail the changes to Actions-Print, Upload, Export, Mail. It is now possible to program the configurations for these Actions. This breakthrough capability has enabled us to deliver the mass mailing feature in our product.
The collection attribute Keep Source has been enhanced to accept a new value i.e. ‘Keep Source : ().This is done with an aim to improve the performance. The Loop Collection capability has paved the way for displaying and operating on Multi Company Data along with ease of programming.
We are enriching the TDL language with more and more procedural capabilities by introducing $$LoopIndex and Looping construct FOR RANGE. There have been some changes in the Action NEW OBJECT as well.
With the introduction of the function SysInfo, it is now possible to retrieve all system related information consistently using a single function.
Programmable Configurations for Print/Export/Upload/Mail actions
In Tally.ERP9, the actions Print, Export, Mail and Upload depend upon various parameters like Printer Name, File Name, Email To, etc. Prior to execution of these actions, the relevant parameters are captured in a Configuration Report.
There are situations when multiple reports are being printed or mass mailing is being done in a sequence. Subsequent to each Print or Email Action, if a configuration report pops up for user input, this interrupts the flow, thereby requiring a dedicated person to monitor the process which is time consuming too.
This has been addressed in the recent enhancement in Tally.ERP 9, where the configuration report can be suppressed by specifying a logical parameter. Additionally, the variables can be set prior to invoking the desired action.
User Defined Function-Enhancements
- Looping Construct-For Range
A new looping construct has been introduced inside User Defined Functions. It is now possible to execute a loop over a finite range of number/date values. i.e. if a loop has to be executed 50 times, then the range of counter variable has to be specified from 1 to 50. For Date range, it is possible to iterate over day, week, month or year.
- New Function-$$LoopIndex
In a programming language usually a loop is executed for a finite number of times using a counter variable. The nesting of loops can go up to infinity. There are scenarios where the current value of the loop variable may be required for intermediate computations. The new function $$LoopIndex is used to provide the iteration count of the current loop or the outer loops up to any level.
- Action New Object-Changes
The Action New Object inside User Defined Function takes Object Type and Object Identifier as parameters. In case Object Identifier is not specified a new object of the specified type is created. If the Object Identifier is specified and the object with this identifier does not exist in the database, the Action Save Target will fail. To overcome this we have introduced an additional logical parameter “Force Create Flag” along with Object Identifier to allow automatic creation of a blank object of the type, if the identified object does not exist in the database.
Collection Attribute Value -Keep Source: ().
The attribute KeepSource takes different values which is used to specify, the In memory source retention of the collection. The various specifications like . , ..,Yes , No were used earlier for this. The source collection is retained along with the data object associated with the UI(User Interface) object in the current UI(User Interface) object hierarchy as per specification. The newly introduced specification “().” is used to keep the source collection with the parent UI object which is either Report, Menu or Function.
Collection Attribute-”Collection” Changes-Loop Collection
We are aware that it is possible to gather the data from multiple collections in one collection using the attribute “Collection” of the Collection Definition. The resultant data in the collection is the union of all objects gathered from the list of data collections specified as comma separated list. The “Collection’ attribute of collection definition is enhanced to repeat and combine the same data collection dynamically based on the number and context of each object in another collection referred to as “Loop Collection”
New Function-SysInfo Introduced
Prior to this release there were a few functions existing in the platform which were used to retrieve system related information. To name a few, MachineDate returns System Date, MachineTime returns System Time etc. There was a requirement to fetch few other information like Windows User Name, IP Address etc.
For consistency, a single function SysInfo has been introduced which accepts different parameters based on the requirement and subsequently return the desired result. The parameter is a keyword like ApplicationPath,CurrentPath, SystemDate etc
Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically to your feed reader.

Comments
No comments yet.
Leave a comment