text
stringlengths 0
5.42k
| source
stringclasses 1
value |
---|---|
What's New in Release 5. 4. 9 292 [Rule Set: Anx_Errors B] Break On : Yes ;; ;;Rule Name ;; Rule Logical Expression ;; break/continue condition Rule : EB1 : @@TN_Error4 Rule : EB2 : @@TN_Error5 : No Rule : EB3 : @@TN_Error6 In the above example, My Rule Set is the name of the Rule Set. A1, A2, and A3 are three different rules defined under My Rule Set. The rule A2 has Break On override by setting its third parameter as No. In this case rule A2 works based on the local value of Break On. @@TNAnnexure1Included, @@TNAnnexure2Included, @@TNAnnexure3Included are logical expressions and defined for A1, A2, A3 respectively. Anx_Errors A, Anx_Errors B are second dimension rule sets. Using these rule sets, it filt ers the first dimension rules based on the requirement. The rules EA1 and EA2 are second dimension rules and these rules are applicable only for the Rule A1. Similarly, EB2 and EB3 rules are applicable only for A2 and A3. Is Included In Any Annexure and Has Any Error are two aggregate rules defined to pre-compute the aggregation for the Rule Set My Rule Set by identifying the level. The aggregate rule Is Included In Any Annexure evaluates in the first level whereas the aggregate rule Has Any Error evaluates in the second level. 2. Definition-Name Set Name Set is a definition to ensure that strings are always segregated a nd separated from the source code expressions. It helps to define a set of Name-Value pairs. It is a convenient way to define static string data, and access the strings easily. You can use Name Sets to define application string groups like-error strings for a given rule, static application data like list of states, list of countries, and so on. Name Set also supports being specified as the data source in a collection. It will results i n a collection where each object represents a Name-Value pair in the Name Set. You need to define all strings of the application together usin g Name Sets to make the corrections of strings easy. In other wor ds, managing strings is made easie r by using Name Set. Syntax [Name Set: <Name Set Name>] Where, <Name Set Name> is the name of the Name Set. | TDL_Reference_Manual.pdf |
What's New in Release 5. 4. 9 29 3 Various attributes and functions in Name Set are explained belo w: 2. 1 Attribute-List Name/List List Name is a Dual list type attribute with a constant name and value. You can use the attribute List Name to specify the identifier and the string. The identifier can b e used to access the value stored in the list. Syntax List Name : <string identifier 1> : <string 1> List Name : <String identifier 2> : <string 2> Where, <string identifier 1 >, <string identifier 2 > are user defined identifiers for the strings < string 1 >, <string 2 >. 2. 2 Function-Name Get Value Function Name Get Value returns a string in the Name Set based on the values passed. T he function Name Get Value takes two parameters, String identifier and Name Set Description Name. Syntax $$Name Get Value:<String Identifier>:<Name Set Description Name> Where, <String Identifier > is the list name identifier. <Name Set Description Name > is the name of the Name Set. Example [Nameset : Annexure Error Strings] List Name : E1 : "PAN Number Invalid" List Name : E2 : "Lorry Number Missing" List Name : E3 : "Commodity Code is Empty" [Function Name Set Test Function] 01 : LOG : $$Name Get Value:E2:Annexure Error Strings ;; This will print "Lorry Number Missing" [Collection: My Collection] Data Source : Name Set : Annexure Error Strings The collection My Collection delivers 3 objects, as given below: | TDL_Reference_Manual.pdf |
What's New in Release 5. 4. 9 294 $Name: E1, $Value = "PAN Number Invalid" $Name: E2, $Value = "Lorry Number Missing" $Name: E3, $Value = "Com modity Code is Empty" 3. Data Type-Flag Set Flag Set data type stores a set of logical values/flags. It takes less m emory to store flag set values compared to the memory takes to store individual logical values. It allows to perform operations on the stored values. This is a variable length data type and hence has no restriction on the number of flags. Currently, Flag Set is generated as a r esult of Rule Set evaluation. You can use Flag Set data type in Variables and Objects. This data type is not directly input-able by the user and not d irectly displayable to the user. The following Flag Set functions help you to perform the operations on Flag Set data type. 3. 1 Function-Flag Get Value You can use the function Flag Get Value to get the value of a flag inside a Flag Set. It returns a logical value. Syntax $$Flag Get Value:<Rule Identifier>:<Flag Set Expression> Where, <Rule Identifier > is a constant identifier or an expression that results in a r ule identifier which is in dotted notation. <Flag Set Expression > evaluates to a Flag Set value. Example $$Flag Get Value:A1. B2:$My Flag Set For flag names, a dotted notation must be used to denote fully qualified name of a flag. It shows the path of rule evaluation. When “*” is passed as the Rule Identifier, it returns the master aggreg ate value (Zeroth flag value) of the Rule Set. 3. 2 Function-Flag Set OR The function Flag Set OR takes two flag sets as input and it performs the OR operation on them. It returns a Flag Set data type. Both flag sets must be obtained by evaluating the s ame rule set (potentially with different obj ects), otherwise this function f ails. Syntax $$Flag Set OR:<Flag Set 1>:<Flag Set 2> | TDL_Reference_Manual.pdf |
What's New in Release 5. 4. 9 29 5 Where, <Flag Set 1> is the first Flag Set expression. <Flag Set 2> is the second Flag Set expression. Example $$Flag Set OR:$Flag Set A:$Flag Set B 3. 3 Function-Flag Set AND The function Flag Set AND takes two Flag Sets as input and it performs AND operation. It returns Flag Set data type. Both flag sets must be obtained by evaluating the s ame rule set (potentially with different objects), oth erwise this function fails. Syntax $$Flag Set AND:<Flag Set 1>:<Flag Set 2> Where, <Flag Set 1 > is the first Flag Set expression. <Flag Set 2 > is the second Flag Set expression. Example $$Flag Set AND:$Flag Set A:$Flag Set B 3. 4 Function-Flags Is All True The function Flags Is All True returns true, if all child rules under given rule are True (AND operator). It returns a logical type. Syntax $$Flags Is All True:<Parent Rule Identifier>:<Flag Set Expression> + [:<Belongs To>] Where, <Parent Rule Identifier> is a constant identifier or an expression that results in a ru le identifier which is in dotted notation. This is used as parent flag. <Flag Set Expression> is the expression which results in a Flag Set on which this op eration is to be performed. <Belongs To> is the logical value to decide whether only immediate children, or all children in the hierarchy of the given parent rule, to be considered. If this p arameter is not specified, the default value is No. Example $$Flags Is All True:A1:$My Flag Set:Yes | TDL_Reference_Manual.pdf |
What's New in Release 5. 4. 9 296 ”*” can be passed as Rule Identifier to perform the operation from the root rule set level. If the parent rule does not have any child rules, then the func tion returns No. 3. 5 Function-Flags Is All True From Level The function Flags Is All True From Level returns True, if all flags are True at a given level. It returns a logical value. Syntax $$Flags Is All True From Level:<Peer Rule Identifier>:<Flag Set Expression> + [:<Leaf Rule Filter>] Where, <Peer Rule Identifier> is a constant identifier or an expression that results in a ru le identifier which is in dotted notation. It is used to specify the level an d the starting point of the aggregation/ operation/walk. <Flag Set Expression> is the expression which results in a Flag Set on which this op eration is to be performed. <Leaf Rule Filter> is the Rule Name to filter the non-qualified leaf flag. If spe cified, only rules ending with this Rule Name will be considered for the aggregati on. If not specified, all rules at the specified level will be considered. Example $$Flag Is All True From Level:A1. B1:$My Flag Set:B1 In the above example, the rule B1 is the Leaf Rule Filter. A1. B1 denotes the second level and the starting point for aggregation. Since B1 is the Leaf Rule Filter, it considered A1. B1 and other rules which ends with B1. The rules such as A1. B2 will not be considered. “*” is not applicable for this function. It walks all flags in the same level as that of the Rule Identi fier specified, starting from the given rule identifier. To consider all rules at a certain level, spec ify the identifier of the first rule in that level. 3. 6 Function-Flags Is Any True The function Flags Is Any True returns True, if any child rule of a given flag is True (OR operator). It returns a logical value. Syntax $$Flags Is Any True:<Parent Rule Identifier>:<Flag Set Expression> + [:<Belongs To>] Where, <Parent Rule Identifier > is a constant identifier or an expression that results in a r ule identifier which is in dotted notation. This is used as parent flag. | TDL_Reference_Manual.pdf |
What's New in Release 5. 4. 9 29 7 <Flag Set Expression > is the expression which results in a flag set on which this o peration is to be performed. <Belongs To> is the logical value to decide whether only immediate children, or all children in the hierarchy of the given parent rule, to be considered. If this p arameter is not specified, the default value is No. Example $$Flags Is Any True:A1:$My Flag Set:Yes “*” is used to perform the operation from the root rule set level. If the parent rule does not have any child rules, then the func tion returns No. 3. 7 Function-Flag s Is Any True From Level The function Flags Is Any True From Level returns True, if any flags are True at a given level. It returns a logical value. Syntax $$Flags Is Any True From Level:<Peer Rule Identifier>:<Flag Set Expression>+ :<Leaf Rule Filter> Where, <Peer Rule Identifier> is a constant identifier or an expression that results in a ru le identifier which is in dotted notation. It is used to specify the level an d the starting point of the aggregation/ operation/walk. <Flag Set Expression> is the expression which results in a Flag Set on which this op eration to be performed. <Leaf Rule Filter> is the Rule Name to filter the non-qualified leaf flag. If spe cified, only rules ending with this Rule Name will be considered for the aggregati on. If not specified, all rules at the specified level will be considered. Example $$Flag Is Any True From Level:A1. B1:$My Flag Set:B1 In the above example, the rule B1 is the Leaf Rule Filter. A1. B1 denotes the second level and the starting point for aggregation. Since B1 is the Leaf Rule Filter, it considered A1. B1 and other rules which ends with B1. The rules such as A1. B2 will not be considered. “*” is not applicable for this function. This function walks all flags in the same level as that of the Rule Identifier specified, starting from the given rule identifier. To consider all rules at a certain l evel, specify the identi fier of the first rule in that level. | TDL_Reference_Manual.pdf |
What's New in Release 5. 4. 9 298 3. 8 Function-Flags Count You can use the function Flags Count to get the number of flags under a given parent rule matching the value passed. It returns a number type. Syntax $$Flags Count:<Parent Rule Identifier>:<Flag Set Expression>: + [<Flag Value> :<Belongs To>] <Parent Rule Identifier> is a constant identifier or an expression that results in a ru le identifier which is in dotted notation. This is used as parent flag. <Flag Set Expression> is the expression which results in a Flag Set on which the ope ration is to be performed. <Flag Value> is a logical value. It can be either True/Yes or False/No. It is used to count flags that match this value. The default value is True/Yes. <Belongs To> is the logical value to decide whether only immediate children, or all children in the hierarchy of the given parent rule, to be considered. If this p arameter is not specified, the default value is No. Example $$Flags Count:A1:$My Flag Set:Yes:Yes ”*” is used to perform the operation from the root rule set level. If the parent rule does not have any child rules, then the func tion returns 0. 3. 9 Function-Fl ags Count From Level You can use the function Flags Count From Level to get the number of flags at the same level, across parents, matching the flag value passed. It returns a nu mber type. Syntax $$Flags Count From Level:<Peer Rule Identifier>:<Flag Set Expression>: + [<Flag Value>:<Leaf Rule Filter>] Where, <Peer Rule Identifier> is a constant identifier or an expression that results in a ru le identifier which is in dotted notation. It is used to specify the level an d the starting point of the aggregation/ operation/walk. <Flag Set Expression> is the expression which results in a flag set on which this op eration is to be performed. <Flag Value> is the logical value. It can be either True/Yes or False/No. It is used to count flags that match this value. The default value is True/Yes. <Leaf Rule Filter> is the Rule Name to filter the non-qualified leaf flag. If spe cified, only rules ending with this Rule Name will be considered for the aggregati on. If not specified, all rules at the specified level will be considered. | TDL_Reference_Manual.pdf |
What's New in Release 5. 4. 9 29 9 Example $$Flag Count From Level:A1. B1:$My Flag Set:Yes:B1 “*” is not applicable for this function. If “?” is specified as the leaf rule filter, the leaf rules will be c ounted only once and duplicates will be ignored. This function walks all the flags in the same level as that of the rule identifier specified, starting from the given rule identifier. To consider all rules at a cert ain level, specify the identifier of the first rule in that level. 3. 10 Function-Flag Get Description You can use the function Flag Get Description to get a String description for the given Rule Identifier. It returns a string type. Syntax $$Flag Get Description:<Rule Identifier>:<Flag Set Expression> <Rule Identifier > is a constant identifier or an expression that results in a r ule identifier which is in dotted notation. <Flag Set Expression> is the expression which results in a flag set. It is used to i dentify the Rule Set from which the rule description is to be obtained. Example $$Flag Get Description:A1:$My Flag Set “*” is not applicable for this function. It returns a description string associated with the rule identi fier. 3. 11 Function-Flags List Description You can use the function Flags List Description to get the list of string descriptions of all immediate child rules for the parent rule identifier passed, se parated by the given character. It returns a string type. Syntax $$Flags List Description:<Parent Rule Identifier>:<Flag Set Expression>: + [<Flag Value>:<Separator Character>] Where, <Parent Rule Identifier> is a constant identifier or an expression that results in a ru le identifier which is in dotted notation. It is the parent rule name. <Flag Set Expression> is the expression which results in a Flag Set on which the ope ration is to be performed. It is also used to identify the Rule Set from whi ch the rule descriptions are to be obtained. <Flag Value> is the logical value. It can be either True/Yes or False/No. It is used to get descriptions of flags that match this value. The default value is True/Yes. | TDL_Reference_Manual.pdf |
What's New in Release 5. 4. 9 300 <Separator Character> is a string value to separate string descriptions. If not specified, the default separator is used. Example $$Flags List Description:A1:$My Flag Set:Yes:"," It considers all immediate child rules which mat ch the flag val ue passed. ”*” can be passed as the parent rule identifier to get the descrip tions from the rules in the first level. 3. 12 Function-Flags L ist Description From Level You can use the function Flags List Description From Level to get a list of unique string descriptions for the set of rules/flags from a given level, acr oss parents that match the flag value passed. It returns a string type. Syntax $$Flags List Description From Level:<Peer Rule Identifier>:+ <Flag Set Expression>:[<Flag Value>:<Separator Character>] Where, <Peer Rule Identifier> is a constant identifier or an expression that results in a ru le identifier which is in dotted notation. It is used to specify the level an d the starting point of the aggregation/ operation/walk. <Flag Set Expression> is the expression which results in a Flag Set on which the ope ration is to be performed. It is also used to identify the Rule Set from whi ch the rule descriptions are to be obtained. <Flag Value> is the logical value. It can be either True/Yes or False/No. It is used to get descriptions of flags that match this value. The default value is True/Yes. <Separator Character> is a string value to separate string descriptions. If not specified, the default separator is used. Example $$Flags Get Description List From Level:A1. B1:$My Flag Set:Yes:"," In the above example, all descriptions at the level of rule A1. B1 and starting from the rule A1. B1 will be considered. However, a des cription will be considered o nly once. Rule A1. B1 and A2. B1 will refer to the same description, (i. e., description of Rule B1, assuming in both cases B1 is referring to same rule) but the description will be taken only once. | TDL_Reference_Manual.pdf |
What's New in Release 5. 4. 9 30 1 3. 13 Function-As Flag Set You can use the function As Flag Set to convert a Num Set to a Flag Set which allows the use of all Flag Set functions. It creates an equivalent Flag Set consi dering all non-zero numbers as True, and zero numbers as False. Syntax $$As Flag Set:<Num Set Expression> Where, <Num Set Expression> is the expression evaluates to a Num Set value. Example $$As Flag Set:$My Num Set This conversion leads to a loss of count information in the res ultant flag set. A True value in the flag set only represents a non-zero value in the original num s et. However, the exact value cannot be obtained. 4. Data Type-Num Set The data type Num Set stores and operates a set of numbers. This is a variable lengt h data type and hence has no restriction on the number of values that it ca n hold. This data type is not directly input-able by the user and not d irectly displayable to the user. The following Num Set functions help you to perform the operations on Num Set data type. 4. 1 Function-Num Get Value Use the function Num Get Value to get a value inside a Num Set. It returns a number type. Syntax $$Num Get Value:<Rule Identifier>:<Num Set Expression> Where, <Rule Identifier> is a constant identifier or an expression that results in a ru le identifier which is in dotted notation. <Num Set Expression> is the expression that e valuates to a Num Set from which the nu mber is to be fetched. Example $$Num Get Value:A1. B2:$My Num Set ”*” helps to extract the master aggregate value (Zeroth num value) of the rule set. | TDL_Reference_Manual.pdf |
What's New in Release 5. 4. 9 302 4. 2 Function-As Num Set You can use the function As Num Set to convert a Flag Set to a Num Set. Syntax $$As Num Set:<Flag Set Expression> Where, <Flag Set Expression> is any expression of Flag Set data type. Example $$As Num Set:$My Flag Set It creates an equivalent Num Set by considering all False values as zero, and True as one. The Num Set generated by this function will contain only 0s and 1s. 5. Other Enhancements 5. 1 Attribute-MAX You can use the attribute MAX at field definition to specify the maximum number of character s that can be entered in the field. It also helps to control the field length with some specific number of characters based on a conditional expression. The expression is evaluated while opening the report. Alias for this attribute is Maximum. This attribute accepts a number which is less than 972. Syntax MAX : <Numerical Expression/Constant> Where, <Numerical expression > evaluates to a number. For example, in Tally. ERP 9, the field PAN/National Identity Number accepts only 10 characters, because India restricts the PAN number with 10 characters. Howe ver, by using this attribute enhancement, based on the country selected, we can control the length of the field. Example Max:If $$Number:$Opening Balance:Ledger:"Cash"< 6 then 9 + else $Opening Balance:Ledger:"Cash" 5. 2 Function-Validate TINMod97 You can use the function Validate TINMod97 to check if the TIN provided is valid or not. It takes an input string which is the TIN and returns a logical value. I t returns True, if the input string is a valid TIN. | TDL_Reference_Manual.pdf |
What's New in Release 5. 4. 9 30 3 To check if the given string is a valid TIN, the function perfo rms the following: 1. Extract the digits from the al phanumeric string and check if there are exactly 11 digits. 2. Rotate the number clockwise 4 times, perform MOD operation on the resulting number with 97, and check if the remainder is 1. The TIN is not valid, if any of the above checks fail. Syntax $$Validate TINMod97:<Alphanumeric Value> Where, <Alphanumeric Value> is the TIN having alphabets as prefix/suffix. Example [Field: Mod 97] Use : Name Field Set as: 27240039198 Notify: Is Valid TIN: Yes [System: Formulae] Validate Tin : $$Validate TINMod97:$$Value Is Valid TIN : If @@Validate TIN then "Valid" Else "NOT Valid" | TDL_Reference_Manual.pdf |
303 What's New in Release 5. 4. 8 1. Language Enhancements in Primitives (TDL) 1. 1 Function-Is Any Empty When you want to check if there is an expression that evaluates to empty among a set of expressions, you c an use the function Is Any Empty. This function evaluates the expression parameters in the sequence specified in the code. It will retur n True, the moment an expression evaluates to empty and ignores the subsequent expressions. Syntax $$Is Any Empty:<Expression1>:<Expression2>:..... :<Expression N> Where, Expressions can be variables, formulae, functions, etc. Example [Collection: TNOld Annex IASummary Without Error] Compute Var : Has Error : Logical :$$Is Any Empty:##sv Ref No: + ##sv Ref Date:##sv Lorry Date Ensure that the sequence of parameters is such that higher the probability of an expression being Empty, earlier in the order they should be placed. Previously, to evaluate more than one expression for empty, you had to use $$Is Empty along with OR operator. Now, you can just use the new function to evaluate m ultiple expression in a single line. 2. Language Enhancements in Procedural (TDL) The actions Increment and Decrement have been enhanced to accept multiple variable. 3. Language Enhancements in Query (Collections) 3. 1 Conditional Walk Ex The condition parameter of the Collection attribute, Walk Ex is now enhanced to check for every Source Object. Syntax Walk Ex: <Collection> [:Condition] Condition is optional parameter. When provided, each source obj ect will be evaluated for based on the condition to decide if Wal k Ex (of specified collection) has to be executed. | TDL_Reference_Manual.pdf |
What's New in Release 5. 4. 8 304 3. 2 Other Enhancements Please click the function/attribute name to know more. 1. $$Is Coll Src Obj Changed : Currently, in Extract Collections while walking the sub-objects, there is no direct way of identifying if the source object context ha s changed. For this purpose, a new function Is Coll Src Obj Changed is provided to identify when a source object is changed during a Walk. 2. $$Coll Src Obj : A new function Coll Src Obj is pro vided to evaluate expression in the context of source object while walking the current object. 3. Source Fetch : A new attribute Source Fetch is provided to fetch methods fro m source object context while walking the current object. 4. Aggr Compute : Apart from the keywords Sum, Min and Max, the collection attr ibute Aggr Compute is enhanced to support the keyword Last to extract the method value from the last object. 5. Re Walk and Re Compute : The collection attributes Re Walk and Re Compute are provided for re-computation in collections. 6. Prefetch and Source Prefetch : New attributes Prefetch and Source Prefetch are provided to pre-fetch the object method and retain the values for the subse quent usage within the current context, without having to re-evaluate the expression (in the O bject Method) each time it is used. 4. Enhancements in Customisation using Productivity Suite Customisation using Productivity Suite is enhanced to take MS E xcel as an input file and produce the specified Excel file as an output. The data is evaluated in the tokenized input file and then, only the values are written to the output file specified in the configuration screen. If the output file is present, data will be updated to the appr opriate cells of respective sheets provided in the input Excel file. If the output file is not pre sent, then the same input Excel file will be created with the specified output file name. To support this capability, MS Excel is introduced as a new Resource Type in Resource definition. | TDL_Reference_Manual.pdf |
305 What's New in Release 5. 3. 8 As we are aware, File Input/Output capability is used to suppor t read/write operations in an Excel or Text file. Currently, if we write any value to an excel file using File I/ O approach, the appropriate column has to be adjusted manually based on the cell width after compl etion of the task. Now, a new capability is introduced to update the Cell Properties, Width a nd Text Wrap. These properties can be set in TD L using the action, Format Exc el Sheet. 1. Action-Format Excel Sheet Action Format Excel Sheet is used to set the cell properties of Excel sheet. It accepts two parameters. Syntax: Format Excel Sheet : <Property Name> : <Property Parms> where, <Property Name> is a system keyword for an Exce l cell property, viz.,Column Wid th or Cell Text Wrap. <Property Parms> is a list of required parameters for the specified Property Nam e and the number of parameters vary based on the Property Name. Example: [Function: File IOExcel] Variable : Input File : String : "D:\Samp Excel. xls” 010 : Open File: ##Input File : Excel : Write 020 : Format Excel Sheet: Cell Text Wrap : 5 : 6 : Yes030 : Format Excel Sheet: Column Width: 1 : 30 040 : Close Target File In the above example, Cell Text Wrap is the Property Name and “5: 6: Yes” is the parameter required for the Cell Text Wrap property. | TDL_Reference_Manual.pdf |
What's New in Release 5. 3. 8 306 Supported Properties Column Width Syntax: Column Width: <Column Number> : <Width> where, <Column Number> is used to specify the column number whose width is to be modi fied. <Width> is the number used to set the new width of the column. Unit of measurement used for this parameter is Points. Cell Text Wrap Syntax: Cell Text Wrap:<Row Number>:<Column Number>[:<Enablewrapping>] where, <Row Number> is used to specify the row number of the cell. <Column Number> is used to specify the column number of the cell. <Enablewrapping> is an optional parameter which specifies whether to wrap the t ext or not. The default value of this parameter is Yes. An expression can also be specified in any of the parameters for the action. | TDL_Reference_Manual.pdf |
307 What's New in Release 5. 3 1. Attribute-Confirm Text/Query Text The Form level attribute Confirm Text/Query Text is used to modify the text displayed in the confirmation window. Syntax Confirm Text : <String Expression> or Query Text : <String Expression> Where, <String Expression> is the text displayed in the confirmation window. Example: [Form: Smp Confirm Text] Part : Smp Confirm Text Confirm Text : "Save?" In the above example, when the form Smp Confirm Text is accepted, the query text Save? is displayed instead of the default text Accept?. 2. Action-Exec Excel Macro The action Exec Excel Macro invokes the available macros defined in the Excel. Syntax: Exec Excel Macro : <Macro Name> [:<Parameter list>] Where, <Macro Name> is the name of the macro. <Parameter list> can be n number of parameters that correspond to the parameter s required by the Excel macro. Example: On : After Export : Yes : Exec Excel Macro : Macroto Compute Graphs : Pie Chart In the above example, when the macro Macroto Compute Graphs is executed, it displays the values in the Excel as a pie chart. | TDL_Reference_Manual.pdf |
TDL_Reference_Manual.pdf |
|
309 What's New in Release 5. 2 1. Column-wise repeat of data over a collection The Form level attribute Repeat is used to repeat data of a collection column-wise in the repo rts created using productivity suites, using the function Tpl Column Object. Syntax Repeat : <Token Name> : <Collection Name> Where, <Collection Name> is the name of the collection or a sub-collection. <Token Name> is the name of the token specified in the document template fo r evaluating the value using the attribute XML Map. 1. 1 Function-Tp l Column Object Function Tpl Column Object evaluates the given parameter in the context of the column obje ct. In the absence of this function, the expression is evaluated in th e current context of the Report. Syntax: $$TPLColumn Object:<Expression> Where, <Expression> can be any expression which evaluates to any data type like, s tring, number, amount, and so on. Example:To print ledger names as columns: Design the document template as shown below: Token is specified in one cell, based on the number of objects in the collection, the columns are added. Add the below code snippet in the required TDL. [Form : Sample Report] XML Map : Led Name : @@TPLCol Obj Name Repeat : Led Name : Ledger Coll [System : Formula] TPL Col Obj Name : $$TPLColumn Object:$Name[Collection : Ledger Coll] Type : Ledger$Led Name | TDL_Reference_Manual.pdf |
What's New in Release 5. 2 310 The output appears as shown below: In this example, the collection includes three ledgers. All the three ledgers are added as columns. Ledger1 Ledger2 Ledger3 | TDL_Reference_Manual.pdf |
311 What's New in Release 5. 0 1. Customisation using Productivity Suites 1. 1 Introduction Customisation using productivity suites is a facility to create reports in the required format with minimal time consumption and effort, using the applications ava ilable in productivity suites like Microsoft Office, Open Office, and so on. Using this facility, Tally. ERP 9 accepts a predefined document template designed using a ny of the productivity suites, and generates output in the desired format. For example, if the input is defined as a Word XML Document, the output is displayed in MS Word. Based on the business requirements, there may be a need for cha nge in the format of default documents like statutory forms pro vided in Tally. ERP 9. To refl ect these changes in the default documents, users can now edit the document template using MS Wo rd or MS Excel, and create the required layout. The applications supported are: Microsoft Office (2003 and above): MS Word, MS Excel Open Office: Open Document Tex t (. odt), Open Document Spreadshe et (. ods) XML (Data Exchange) 1. 2 Prerequisites for the User The user is required to have any of the following productivity suites: MS Office 2003 or higher version Open Office Office Viewer 1. 3 TDL Enhancements for the Capability In Tally. ERP 9, all reports follow the design hierarchy of FormPart LineField. The same hierarchy is used for creating and printing the defined layout. The user can design the required document template for print as a MS Word or MS Excel document, and save it in XML format. The designed document temp late contains the layout, and the corresponding data to be fetched. Once the document is desi gned, it is to be associated to the respective TDL Form definition. Once the document is associated to the Form definition, Tally. ERP 9 uses any compatible format ba sed on the productivity suite available in the user system. To know more about designing or creating the document template, refer the section Guidelines for Designing Document Template. | TDL_Reference_Manual.pdf |
What's New in Release 5. 0 312 Tally. ERP 9 accepts this document. In this case, the applicatio n does not proceed further into the hierarchy. To support the capability Customisation using Productivity Suit es, two Form level attributes and four platform functions are introduced. Also, the attribute val ue of Resource Type is extended to accept other file formats. The language enhancements are listed below: Form Attribute-Resource Form Attribute-XML Map TDL Function-$$Tpl Line TDL Function-$$Word Info TDL Function-$$Excel Info TDL Function-$$Is File Type Supported Resource Types-Word XML, Excel XML, XML, ODT, ODS Form Attribute-Resource The attribute Resource at Form definition is used to specify the name of the Resource definition, which provides the details of the document template. This docum ent template is used for exporting/printing the Form. Syntax: [Form: <Form Name>] Resource : <Resource Name> Where, <Resource Name> is the name of the resource definition. Form Attribute-XML Map XML Map is a Form level list type attribute, used to provide correct v alue for the token(s) specified in the document template. Token is an alpha-numeric value without any spaces, prefixed wi th $. No special characters are allowed in the token name. It is an expression specified in the document template to map the values from Tally. ERP 9. For example, $Name, $Cmp Name, $Fr Date, $Val1When the document template is used for exporting/printing: The defined tokens in the document template are substituted wit h the respective values by evaluating the expression in XML Map attribute, against the def ined token. If the token is not defined in the document template, it evalua tes as a method in current object context. A token refers to a method of current object co ntext. In this case, defining XML Map is not necessary. XML Map also allows specification of repeatable data, when it i s referenced in Tally. ERP 9. It creates required number of rows/ entries for each object in t he collection. | TDL_Reference_Manual.pdf |
What's New in Release 5. 0 31 3 Syntax: [Form: <Form Name>] XML Map: <Map Name>: <Expression >[:<Collection Name>] Where, <Map Name> is the name of the token specified in the document template fo r evaluating the value. <Expression> is a valid TDL expression such as method, variable, system for mula. <Collection Name> is specified where the token is defined for repeating the data. It is an optional parameter. Example: [Resource: Invoice Word] Source : "D:\Work\Invoice Word. xml" ;;It is the word document saved as. xml(WORDXML) Resource Type : Word XML [Form: Inv Frm] Resource : Invoice Word XML Map : Basic SDN : @@Del Note No XML Map : SVCompany : ##SVCurrent Company XML Map : Rate : $Rate : Inventory Entries [System: Formula] Del Note No : $Basic Ship Delivery Note In the example, Invoice Word is the name of the resource. Basic SDN, SVCompany and Rate are the tokens which are defined in the document template, and values are taken from the respective second parameters, @@Del Note No, ##SVCurrent Company and $Rate:Inventory Entries. | TDL_Reference_Manual.pdf |
What's New in Release 5. 0 314 TDL Function-$$Tpl Line Function $$Tpl Line provides line number or object index number in the current collection, where the paragraph or rows of the document template are repeated. Syntax $$Tpl Line Example: [Form: Inv Frm] Resource : Invoice Word XML Map : Line : $$Tpl Line TDL Function-$$Word Info This function helps to find whether MS Word is installed in the user system or not. It accepts any one parameter, i. e., Version or Is Docx Supported. Version-to get the version number of MS Word. Is Docx Supported-to check whet her the. docx format is supporte d or not. Syntax: $$Word Info : <Info Type> Where, <Info Type> has two values, i. e., Version and Is Docx Supported For every token, Tally. ERP 9 looks for an XML Map definition If Tally. ERP 9 finds the specified token in the XML Map definition, it evaluates and replaces the specified expression. If Tally. ERP 9 does not find the specif ied token in the XML Map definition, it treats the token as a method in current object context, and evaluates the value. If the value corresponding to a token is not found in the XML Map or in any of the object storages/methods, the token is printed as it is in the document. For example, $Duty Value is the token, and there is neither XML Map with this name nor any storage/method in that object context, then system prints $Duty Value as it is, indicating that th e value corresponding to the token is not available. When collection name is specified, the specified paragraph or row in the docu-ment template is repeated for every collection object. When the objects are not found in the collection, paragraph or row is not displayed. | TDL_Reference_Manual.pdf |
What's New in Release 5. 0 31 5 Example: Set as : $$Word Info : Version Set as : $$Word Info : Is Docx Supported TDL Function-$$Excel Info This function helps to find whether MS Excel is installed in th e system or not. It accepts any one parameter, i. e., Version or Is Xlsx Supported. Version-to get the version number of MS Excel. Is Xlsx Supported-to check whether the. xlsx format is supporte d or not. Syntax: $$Excel Info : <Info Type> Where, <Info Type> has two values, i. e., Version and Is Xlsx Supported Example: Set as : $$Excel Info : Version Set as : $$Excel Info : Is Xlsx Supported The behavior of different versions of MS Office in the use of $ $Excel Info and $$Word Info are as shown below: TDL Function-$$Is File Type Supported It returns the logical value, whether the provided format is su pported in the system or not. Syntax: $$Is File Type Supported : <document extension> Where, <document extension> is the type of file extension. Example: $$Is File Type Supported:”. odt” $$Is File Type Supported:”. ods”MS Office Version Docx Supported Xslx Supported 2003 11 No No2007 2010 14 Yes Yes 2013 15 Yes Yes | TDL_Reference_Manual.pdf |
What's New in Release 5. 0 316 The behavior of different versions of MS Office are as shown be low: Resource Types-Word XML, Excel XML, XML, ODT, ODS In TDL, Resource definition is used to access and use the resources (images, ic ons, cursors, etc. ) from a local disk, HTTP/ FTP, or from a DLL/EXE. The forma ts supported are BMP/JPEG/ ICON/CUR. These resources are allowed in Part definition, using the attribute Image for displaying, printing and exporting. To support the facility Customisation using Productivity Suites, the capability of Resource definition is enhanced to use the resources like Word Xml, Exce l Xml, Xml, odt, ods as resource types. Syntax: [Resource: <Resource Name>] Source : <Path to File> Resource Type : <Supported Resource> Where, <Path to File> is the path to the document or Image. <Supported Resource> is the resource type which is supported. The supported resourc es are ODS/ODT/WORD XML/Excel XML/XML/Bitmap/Icon/Jpeg/Cursor. Example: [Resource: Invoice Word] Source : "D:\Work\Invoice Word. xml" ;;this is the document saved as xml Resource Type : Word XML In the example, Invoice Word. xml is the Word XML document template, and it prints in Word format from Tally. ERP 9. MS Office. odt Supported. ods Supported 2003 No No2007 No No 2010 No No 2013 Yes Yes | TDL_Reference_Manual.pdf |
What's New in Release 5. 0 31 7 1. 4 Guidelines for Designing the Document Template To design a document template consider the following Design the document template for a new format. Use the document template available in Word/ODT/Excel/ODS. Thes e document tem-plates may require modifications to get a proper output. The file formats supported with this facility to print/design a document in printable format are: Creating Multiple Formats To create document templates in multiple formats 1. Design the document template either in MS Office or Open Offi ce. 2. Copy the document template, and Save As in the required format. Example: 1 1. Design the document template in Word. 2. Save the document template as Word 2003 XML document(. xml). 3. Open the designed document template. 4. Copy the content from the template. 5. Open an Open Office document, and paste the content. 6. Save as. ODT. 7. Open with any of the Open Office applications. Format Format Type Usage Word Formats Word 2003 XML Document (. xml)For complex layouts, multiple tables, Forms, and so on. Open Document Text(. odt) Excel/Spreadsheet Formats Excel Spreadsheet 2003 (. xml) For listing summary, annexure, and so on. Open Document Source(. ods) Generate any suitable format which is suitable for customers/clients in Microsoft or Open Office. Designed document template is for generic purpose, it is recommended that generate the document templates in Word XML, &. ODT and Excel XML &. ODS format. | TDL_Reference_Manual.pdf |
What's New in Release 5. 0 318 Example: 2 1. Design the document template in Word. 2. Save the document template as Word 2003 XML Document (. xml). 3. Open the designed document template. 4. Save as. ODT in Word. 5. Open the document template using any of the Open Office appli cations. 6. If the format is incorrect, correct the format, and save as. ODT. 3. Print the designed document template and check the font, alig nment, width of values, data wrapping, image, value with page break, and so on, for any form atting errors. Using Multilingual Capability in the Document Template In T ally. ERP 9, to print/e-mail/ upload the documents in differe nt languages, the document templates are flexible and can be generated in the desired lang uage. In multilingual document templates, the tokens are always in English. Scenarios:Scenario 1: Titles in English, and data in any other language a. Create the document template wit h all labels/titles in Englis h. b. Token values are printed in the language used to enter data i n Tally. ERP 9. The title appears in English, and data, based on language settings in Tally. ERP 9. Scenario 2: Titles and data in a different language a. Create the document template with the labels/titles in any on e language by setting the Win-dows keyboard language. b. The data is printed in the language used in Tally. ERP 9. The title appears in one language, while data will appear in the language set in Tally. ERP 9. General Guidelines 1. Use platform defined resource types : Word XML, Excel XML, XML,. ODT and. ODS are con-sidered as valid resource types for the capability Customisatio n using Productivity Suites. Any other resource types are treated as invalid, and does not print. 2. Horizontally adjacent tables are not applicable for Excel/. ODS : Two tables adjacent to each other horizontally (one table repeating on one set of data, and other table repeating another set of data) are not recognised as separate, as Excel c onsiders the complete row as a single table. 3. Design table within table for Word/. ODT : To have multi-line address in a single cell, add a table inside that cell, with the required number of columns. Wh en data is repeated for that table, the number of rows are added accordingly. When you design document template usin g the multilingual capability use the font which supports Unicode. For example., Arial Unicode MS. | TDL_Reference_Manual.pdf |
What's New in Release 5. 0 31 9 4. Print a single form in multiple pages : Check the headers for each page. Use the option Fit to one page, if required. Select the appropriate orientation, portrait or landscape. Adjust margins to fit more columns, and so on. 5. Horizontal repeat over a string to print each letter/digit in s eparate boxes is supported: Horizontal repeat over a string is supported character-wise als o. For example, if TIN number has 10 digits, and each digit is printed in separate boxes. To achieve this, while designing the template in Word/ODT, crea te a table with number of cells equivalent to the number of characters in the data, and specify the token in the first cell, as shown below: By adding the below code snippet in the TDL, the output appears as shown below: [Form: sample] XML Map : TIN : $Tin Number ;;$Tin Number = 4512468921 Repeat : TIN : String If the document template does no t support the character length of the data, data loss will occur. In this case, add the code snippet in TDL shown below: [Form: sample] XML Map : TIN : $Tin Number ;$Tin Number = 4512468771 Repeat : TIN : String The output appears as shown below: In this example, the document template contains only 5 cells, a nd the data has 10 characters. Hence, in the output, only 5 characters are displayed. Print/Export/E-mail/Upload for Multiple Objects/Forms When print/export/e-mail/upload is done for multiple objects, s pecified as part of Collection attribute at Report level, that many number of files are genera ted. 26547 9 0 528 $TIN 45 1246892 1 $TIN 4 5124 | TDL_Reference_Manual.pdf |
What's New in Release 5. 0 320 Consider the below points: Print with preview: The number of files generated, opened and printed, equals the n umber of objects. The files are deleted once they are viewed and closed. The name of the file is randomly generated. The file extension is decided by the format selected in the con figuration screen. Print without preview: The number of files generated and printed equals the number of objects. The files are deleted once they are printed. The name of the file is randomly generated. The file extension is decided by the format selected in the con figuration screen. Export: The number of files generated equals the number of objects. Onl y the first file is opened. The name of file is user specified The extension is decided by the format selected in the configur ation screen Designing XML Formats XML formats are used to interchange the data as per the persona lized requirements. In Tally. ERP 9 these formats are used to upload files to government websites, for filing returns. These XML formats are either provided by the government. Once the XML format is ready, 1. Define tokens in between the XML tags for values Use the XML attribute _ _tly Empty If = “$<Token Name>” to eliminate a particular tag from the XML. 2. Edit the XML using editors like Notepad, Notepad++, Slick Edit, and so on. 3. Save the edited document template as. xml file. The XML tag can be repeated for a TDL collection of data. The r epeated XML tags can further have tags which are repeated for other TDL collection of data. Some Known Issues Merging rows are not supported in Excel. When exporting data, using XML(data interchange) Sysnames and d ata with special char-acters, for example, Primary, are not considered. Excel XML format does not consider images for print/export/email /upload. Export While exporting the documents specify the proper format in the export configuration screen, and proper file name extension to achieve the expected output. Prov ide the format and file extension based on requirements. | TDL_Reference_Manual.pdf |
What's New in Release 5. 0 32 1 Protecting the Document Templates from Edit Word XML: Open the document template in MS Word. Click Restrict Editing from Review. Select the option Allow only this type of editing in the document. Click Yes, Start Enforcing Protection, the screen Start Enforcing Protection appears. Enter the password details, if required. Click OK to accept the changes. Save the document template. This will save the document as read only, and it can be edited only if users clear this option. ODT: Open the document template in any Open Office application (Libr e Writer). Save As the document template, and select the option Save Password. Enter the password details. Click Cancel and proceed. It saves the document template as read only, and it can be edit ed only if users clear the option Save Password. Excel XML: Open the document template in MS Excel. Click Protect Sheet button from Review menu. Select the options Select locked cells, Select Unlocked Cells, and click OK. Save the document template. It saves the document template as read only, and it can be edit ed only if users clear the option. ODS: Open the document template in any Open Office application (Libr e Writer). Click Save As to save the document template, and select the option Save Password. Enter password details. Click Cancel and proceed. Export Format Format File Extension Word XML Word 2003 XML Document (. xml). xml ODT Open Document Text. odt Excel XML Excel. xls ODS Open Document Spreadsheet. ods | TDL_Reference_Manual.pdf |
What's New in Release 5. 0 322 It saves the document as read on ly, and it can be edited only i f users clear the option Save Password. 2. Other Language Enhancements 2. 1 Function-$$Make Mail Name The function Make Mail Name is being used in TDL to construct the e-mailing details like s erver name, To e-mail addresses, Cc e-mail addresses, Subject, and so on. However, in TDL there is no capability to send a bl ind carbon copy (Bcc). The function Make Mail Name is enhanced to accept an optional parameter Bcc address. E-mail addresses specified here will not be displayed for recipients l isted under To and Cc. Syntax: $$Make Mail Name: <To Address>: <SMTP Sever Name>: <From Address>: + <CC Address>: <Subject>: <User Name>: <Password>: + <Use SSL Flag> [:<Use SSL on Standard SMTP Port> + [:<Bcc Address>]] Where, <To Address> is the e-mail address of the recipient. <SMTP Server Name> is the name of the e-mail server from which the e-mail is sent. <From Address> is the e-mail address of the sender. It must contain company n ame and e-mail address. <Cc Address> is the e-mail addresses to whom the copy of this e-mail is sen t. <Subject> is the subject of the e-mail. <User Name> is the authenticated user name on the secured server. <Password> is the password for the user on the secured server. <Use SSL Flag> can be True if the secured SMTP server is being used. <Use SSL on Standard SMTP Port> can be True if the SSL is used on the default/standard SMTP Port. <Bcc Address> is the e-mail address to whom the blind carbon copy of the e-m ail is sent. Example: $$Make Mail Name :mailserver. tallysolutions. com :”Tally”<”Frommail@tallysolutions. com”> :”To User1@tallysolutions. com,To User2@tallysolutions. com, To User3@tallysolutions. com”: ”Cc User1@tallysolutions. com, Cc User2@tallysolutions. com”: ”Your Outstanding Payment”:”” :””:No : No : ”Bcc User1@tallysolutions. com, | TDL_Reference_Manual.pdf |
What's New in Release 5. 0 32 3 Bcc User2@tallysolutions. com” 2. 2 Action-Delete Target Action Delete Target is introduced to delete a primary object from the company. Syntax: Delete Target Example: [Function: Emp Led Deletion] 00 : Walk Collection : Empty Ledgers 10 : Set Target20 : Delete Target 30 : End Walk In the example, the action Delete Target is invoked. Delete Target then walks the collection Empty Ledgers, sets the current ledger object to target context, and deletes the ledger. 2. 3 Data Type-Calendar Calendar data types, viz., Date, Time, Date Time, Duration, and Due Date, were introduced in the previous releases to support various business requirements like, capturing date and time of entering a voucher, calculating weekly average log-in time of e mployees, and so on. To extract the Hours, Minutes, Seconds, and Milliseconds from T ime data type, a set of functions have been introduced. Function-$$Hour Of Day The function $$Hour Of Day is used to extract the hour from a value of the data type Time. Syntax: $$Hour Of Day : <Time Expresssion> Where, <Time Expresssion> is a valid time value. Example: $$Hour Of Day : ##User Input Time Value Function $$Minute Of Day The function $$Minute Of Day is used to extract the minutes from a value of data type Time. Masters can be deleted only when empty. For example, if there is a transaction under the master that is being deleted, then the master object cannot be deleted. | TDL_Reference_Manual.pdf |
What's New in Release 5. 0 324 Syntax: $$Minute Of Day : <Time Expresssion> Example: $$Minute Of Day : ##User Input Time Value Function $$Second Of Day The function $$Second Of Day is used to extract the seconds fr om a value of data type Time. Syntax: $$Second Of Day : <Time Expresssion> Example: $$Second Of Day : ##User Input Time Value Function $$Milli Second Of Day The function $$Milli Second Of Day is used to extract the millisecond from a value of data type Time. Syntax: $$Milli Second Of Day : <Time Expresssion> Example: $$Milli Second Of Day : ##User Input Time Value 2. 4 Definition-Query Box Query Box action is used to display the query box with two options. Now, a definition Query Box is introduced to provide multiple options. You can use the definition Query Box to create a query box with specific queries in TDL. Using this definition multiple options can be provided, including a s hortcut 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 use rs to select. Syntax [Query Box : Query Box Name] Title : <Query box title>Horizontal Align : <Alignment of Query Box>Vertical Align : <Alignment of Query Box> Query : <Hot Key> : “<Query option string>” : “<Additional description>”Query : <Hot Key> : “<Query option string>” : “<Additional description>” : : | TDL_Reference_Manual.pdf |
What's New in Release 5. 0 32 5 Default : <Enter key option index> : <Escape key option index> Where, Title-This attribute displays the title of the query box. Horizontal Align -This specifies the horizontal alignment of the query box on the screen. Values can be left, center or right aligned. Vertical Align -Specifies the vertical alignment of the query box on the scr een. Values can be top, center or bottom aligned. Query -This attribute lists the query, key, and text to explain the implication of the option in the query box. Default -This attribute sets the default value in number when the Enter or Escape key is pressed. The first attribute corresponds to the Enter key, while the second attribute corresponds to the Escape key. 2. 5 Action-Query Box Ex The action Query Box is used to display the query box with dual options, and waits for the user to select an option. The action Query Box Ex is a procedural action which invokes a predefined query box. This action displays the query box as per the behavi or specified in the Query Box definition, and displays multiple options as specified in the d efinition. The selected option can be accessed by using the function Last Result after this action. Syntax Query Box Ex : <Query Box Name> Where < Query Box Name > is the name of the Query Box definition. 2. 6 Attribute-Control Ex A Form attribute Control controls the acceptance/rejection of a Form, based on the logi cal evaluation of the expression. Similarly, the Form attribute Control Ex can be used to invoke the defined Query Box, and control the behavior of the Form. The selected response c an be held in a variable. Syntax Control Ex : <Query Box Name> : <Logical Expression> [:<Variable Name>] Where, <Query Box Name > is the name of the Query Box definition. <Logical Expression > if specified as Yes, displays the query box. <Variable Name > is a variable name which is updated with the selection index, post query box execution. It is an optional parameter. | TDL_Reference_Manual.pdf |
What's New in Release 5. 0 326 If Variable Name is not specified, the selection index is not a vailable for post query box execution, only Control behavior will work. 2. 7 Attribute-Unique The Field attribute Unique is used to control the repeated Line with the Field having uni que values. However, the uniqueness behavior ignores the noise char acters, and considers the strings tallyuser@tally. com and tally. user@tally. com to be same. Hence, to check the uniqueness in terms of exact matching of strings, Field attribu te Unique is enhanced to accept a second logical parameter (optional). The second parameter is va lid only if the first parameter is Yes. If the second parameter is Yes, then the Field is checked for uniqueness of the strings. Syntax Unique : <Logical Expression> [: <Logical Expression>] Where, <Logical Expression > can be Yes to enable exact match for strings and vice versa. By default, the second l ogical expression is No. Example:When both the logical expressions are specified as Yes, tally. user@tally. com and tallyuser@tally. com are considered two unique strings. 2. 8 Attribute-Walk Ex Collection attribute Walk Ex is used to walk the paths of the source collection, similar to attribute Walk. The advantage with Walk attribute is that more than one path can be traversed within a single pass, as against having two summary collections. It walk s the same source for as much as sub-objects. Attribute Walk walks over the sub-objects irrespective of whether it is requi red or not. To support conditional walk, attribute Walk Ex has been enhanced to accept a logical expression as its second parameter. Based on the evaluation of the logical expres sion, the attribute Walk Ex will or will not walk the paths spec ified in the collection list. Syntax: [Collection : My Collection] Walk Ex : <Collection Name> [:<Logical Expression>] Where,The user response can be accessed using the variable value, which can be used in the event On: Form Accept, and the desired outcome can be achieved. | TDL_Reference_Manual.pdf |
What's New in Release 5. 0 32 7 <Collection Name > is the name of the collection name specifying walk, and aggre gation/ computation attributes. <Logical Expression > is an optional logical parameter which determines whether to walk over the sub-objects or not. | TDL_Reference_Manual.pdf |
TDL_Reference_Manual.pdf |
|
329 What's New in Release 4. 8 The Release 4. 8 of T ally. ERP 9 comes with a number of TDL enhan cements in Data Import, Events, Actions, Functions, etc., which have been discussed ahead in d etail. 1. Data Importing Enhancements Updation of data is vital for all kinds of reports generated in any business organisation. Hence, the designed system must be robust enough to accept the data with a ppropriate validation and controls. 'Garbage in, Garbage Out', as we have commonly heard, means that any invalid data entered into the system would result in an invalid output. T all y allows updation of data through various sources. They are: Manual Data Entry Data Updation through User Defined Functions, from any External Source Data Import from XML/SDF files, Synchronization and Third Party Application Request Whenever data is received for updation from any source, validat ions like matching of Debit/Credit T otals, availability of dependent masters in the data while imp orting voucher, etc., are done prior to updating the database. These basic validations, without whic h Objects cannot exist in the database, are taken care of by the T ally platform, irrespective of the data source. However, there are certain business rules/controls like Entry outside Current Accounting Period not being accepted, Sales to Party exceeding Credit Limits not being allo wed, etc., which also need to be applied. In the case of User Interface, these controls are provided wit hin the default application, so that when the user makes entries, the data is accepted only after these controls are passed. While updating the Data through a User Defined Function, the pr ogrammer can apply the relevant checks prior to importing the Objects in the T ally Database. Before this Release, during data import from XML/SDF files, Syn chronization or from an external request, the data could not be validated for these business rul es, and hence, the data import could not be stopped even if the Object was invalid. In Release 4. 8, a few Enhancements have been made to give appropriate controls to the Programmer during the process of importing the data from any source. Thus, it empowers the TDL Programmer to t ake any desired action while Importing the Data. These enhancements are as listed below: Apart from the three existing Import File Events, namely 'ST ART IMPORT', 'IMPORT OBJECT' and 'END IMPORT', a new Event ' After Import Object ' has been introduced to perform the desired action after importing every Object. Two Logical System V ariables ' SVImport Object ' and ' SVContinue Import ' have been introduced, which give control to the TDL Programmer to conditi onally import the Objects, or to terminate the Import Process. Enhancements have also been introduced for sending a customized response to the requesting application, in case of SOAP Request. T o complement all the above Enhancements, a set of new Function s like $$Import Info, $$HTTPInfo, $$Import T ype, $$Last Import Error, etc., have been introduced. | TDL_Reference_Manual.pdf |
What's New in Release 4. 8 330 1. 1 Import Events The Import Events 'Start Import', 'Import Object' and 'End Impo rt' are available in T ally. ERP 9 since Release 3. 0. All these Import Events can be used within the Definition 'Imp ort File'. The Event 'Start Import' is invoked only once, at the beginning of Data Import. The Event 'Import Object' is invoked for every Object, prior to importing the Object in current context. The Event 'End Import' is invoked only once, at the end of Data Import. Import Event-After Import Object' In Release 4. 8, a new Event 'After Import Object' has been introduced to allow the TDL Programmer to take any desired action, every time an Object is imported. This Event will help the user to create appropriate logs after Importing of each Object, termina te the Import Process based on some condition, track/record changes that can be used for prepa ring the response (for SOAP requests), etc. Syntax [Import File : <Import File Definition Name>] On : After Import Object: <Logical Condition Expr> : <Action Keyword> + : <Action Parameters> Where, <Logical Condition Expr> is a Logical Expression, which when evaluates to TRUE, executes the given Action. <Action Keyword> is the Action to be taken once the System Event is triggered. <Action Parameters> are the parameters required for the particular Action. Example: [Import File : All Masters] On : After Import Object : Yes : Call: Update Log On : End Import : Yes : Call: Show Log [Function : Update Log] 00 : If : $$Import Action = "Errors" ;; New Function introduced to check whether the updati on of current object is successful or encountered with an error 10 : Log : $$Last Import Error ;; New Function to return the Error encountered during last Import Object 20 : End If [Function : Update Log] 10 : Exec Command : TDLFunc. Log | TDL_Reference_Manual.pdf |
What's New in Release 4. 8 33 1 In this example, after import of each Object, the Event 'After Import Object' is triggered, which calls a Function 'Update Log' to update the logs with Error Str ing, if any. Once the Import Ends, the Event 'End Import' is triggered, thereby calling the Functi on 'Show Log' to open the File TDLFunc. Log for browsing through the errors occurred, if any. 1. 2 System Variables The Events 'Start Import', 'Import Object', 'After Import Objec t' and 'End Import' provide some controls to the TDL Programmer. Inspite of having these controls, the Objects would get import ed after performing the Actions corresponding to the Events, irres pective of the user choice. Hence, to give complete control to the user to take the suitable actio n, two new Logical System V ariables 'SVImport Object ' and ' SVContinue Import ' have been introduced. System Variable-SVImport Object With the help of the System V ariable 'SVImport Object', the TDL Programmer is empowered to decide whether to import the current object or not. It is a log ical variable which communicates the same information to the system. If this V ariable is set to FALS E or NO, the current Object will not be imported. The default value of this variable is TRUE or YES. Ideally, the value of this variable needs to be set/altered only at the Event 'Import Object', whic h is triggered prior to importing the current Object. Example: [#Import File : All Masters] On : Import Object : $$Is Stock Item:Call:Dontoverride Existing Item [Function : Dontoverride Existing Item] 00 : IF : $$Is Empty:$Name:Stock Item:$Name 10 : Set : SVImport Object : True 15 : Msg Box : "Creation" : "Stock Item" + $Name + "being created"20 : Else : 30 : Set: SVImport Object : False 35 : Msg Box : "Alteration" : "Stock Item" + $Name + "already + exists and cannot be altered" 40 : End If In this example, the Event 'Import Object' is triggered while i mporting the Masters and the Function 'Dontoverride Existing Item' is invoked only if the curr ent Object is of Type 'Stock Item'. The currently imported object is available as the object in context. | TDL_Reference_Manual.pdf |
What's New in Release 4. 8 332 This Function checks if the current Stock Item is available in the T ally Database. If the Stock Item is not found, then the V ariable 'SVImport Object' is set to TRUE, w hich instructs the system to continue to import the current Stock Item Object. If the Stock Item is found in the current Company being Imported, the V ariable 'SVImport Object' is set to FALSE, which prohibits the Importing of the current Stock Item Object. System Variable-SVContinue Import With the help of System V ariable 'SVContinue Import', the TDL Pr ogrammer gets the control to decide whether to terminate the Import Process, or to continue further. It is a Logical V ariable which communicates the same information to the System. If the L ogical value of the V ariable is set to FALSE or NO, the import process will be terminated. The default value is TRUE. Ideally, the value of this variable needs to be set/altered only at the Even t 'Import Object' or 'After Import Object', since these events are triggered before and after the importing of every Object. Example: [#Import File : Vouchers] On : Start Import : Yes : Call : Initialize System Variable On : Import Object : Yes : Call : Increment System Variable On : After Import Object : ##System Varfor Import= 5 0 : Call + : Terminate Import Process [Function : Initialize System Variable] 00 : Set : System Varfor Import : 1 [Function : Increment System Variable] 00 : Increment : System Varfor Import [Function : Terminate Import Process] 00 : Set : SVContinue Import : False In this example, it is intended to import only 5 0 Objects, beyond which, the Import process should be terminated. A variable 'System V arfor Import' is initialized a t the 'Start Import' Event. During the 'Import Object' Event, the value of this variable is Incremente d for each Object. After importing 50 Objects, the Import Process is terminated by setting the V ariab le 'SVContinue Import' to FALSE. 1. 3 Customized response wit h 'Response Re port' attribute When a SOAP Request is received to Import Data from an external application, T ally. ERP 9 imports the data and sends an appropriate default response to t he Third Party Client. The default response sent to the requesting Clients after Importing the Dat a is as follows: <RESPONSE> <CREATED>3</CREATED> <ALTERED>2</ALTERED> | TDL_Reference_Manual.pdf |
What's New in Release 4. 8 33 3 <LASTVCHID>87</LASTVCHID> <LASTMID> 0</LASTMID> <COMBINED>0</COMBINED> <IGNORED> 0</IGNORED> <ERRORS>0</ERRORS> <CANCELLED>0</CANCELLED> </RESPONSE> However, the various Clients sending requests have disparate Integratio n solutions implemented and hence, the expectation is that the response must be in the formats pr escribed by their Integration Solutions. Thus, in order to provide flexibility to the TDL Programmer by supporting the required formats in disparate Integration scenarios, a new Impo rt File Attribute 'Response Report ' has been introduced. Attribute-Response Report The attribute 'Response Report' has been introduced in the 'Rep ort File' definition to allow the TDL Programmer to send the response back to the requesting clie nts. It accepts the Report Name as the parameter. This Report will be used to construct the XML Response, which will be sent back to the Clients. Syntax [Import File : <Import File Name>] Response Report : <Report Name> Where, <Import File Name> is any Import File Definition Name, for which the appropriate R esponse needs to be constructed. <Report Name> is the Name of the Report which is used to construct the XML Re sponse to be sent to the Client. Example: [Import File : Vouchers] Response Report : Tally Custom Response ;; Report to be defined with appropriate XML T ags In this example, the Response Report 'T ally Custom Response' need s to be defined, with appropriate XML T ags. However, to update the values like the no. of vouchers created, altered, etc., some platform functions are required, which are explained in the nex t topic 'Functions Introduced'. The Response report can also be used for recording additional i nformation and using it at the time of preparation of response. When the Response report is specifi ed, the system will only send the output as created in the Response Report, and hence, the TDL programmer has to make sure that the required output is generated from this Report. If the requestor wants to know what | TDL_Reference_Manual.pdf |
What's New in Release 4. 8 334 happened to the individual objects sent, it is now possible to track the same using these Enhancements and send an appropriate response for each. 1. 4 Functions Introduced Function-$$Http Info The Function $$Http Info is used for getting the details of the URL Host, Content-Length and Header information available during the receiving of the SOAP r equest. This Function accepts two parameters-'Info Type' and 'Info Sub Type'. Info Type accepts the URL, the Content-Length and the Header. Info Sub Types can appear only for Info Type Header. When Info Type is Header, all the Header details like UNICODE, Connection, Content-Type, etc., can be extracted. Syntax $$HTTPInfo : <Info Type> $$HTTPInfo : Header : <Info Sub Type> Where, <Info T ype> can be URL, Content-Length or Header. <Info Sub T ype> is necessary only if the Info Type is a Header, and can consist of any Request Header information. Figure 1. SOAP Request Let us see some examples with respect to the SOAP Request as se en in Figure 1. Example: $$HTTPInfo : Content Length From the SOAP request received, the function extracts the Conte nt Length and returns the value as 12512. $$HTTPInfo : Header : Content Type From the SOAP request received, the function extracts and retur ns the value of the Header Content-Type, which is text/xml; charset=Utf-16 in this case. | TDL_Reference_Manual.pdf |
What's New in Release 4. 8 33 5 $$HTTPInfo : Header : Unicode From the SOAP Request received, the function extracts the value of the Header UNICODE, which is YES in this case. The Function $$HTTPInfo can be used to retrieve any value from the Header. For example, to retrieve the Mobile Number from an SMS received through 'Nat Lan g Query' Event, we can use the expression $$HTTPInfo:Header:Mobile Number Function-$$Import T ype The Function $$Import Type is used to determine the type of Impo rt, i. e., the source of data. The possible Import Types could be 'S ync', 'Migration', 'Remote', ' Nat Lang', 'SOAP' and 'Manual'. Syntax $$Import Type Here, the Function returns the source of data, which could be a ny one of the above sources. Function-$$Import Action This function is used to indicate the status of Import, i. e., whether the current Object was Created, Altered, etc. The possible results are 'Created', 'Altered', 'I gnored', 'Combined', and 'Error'. Syntax $$Import Action Here, the function returns the status of the Import of current object. Function-$$Last Import Error The Function $$Last Import Error can be used to extract the Impor t error description for the last object imported, which is helpful to retrieve after every impor t, and appropriate error logs can be maintained and displayed at the end of the Import Process. In c ase there is no Error while Importing the current Object, it would return the value as 'Emp ty'. Syntax $$Last Import Error Here, the function returns the Import error description for the last object imported. Function-$$Import Info The Function $$Import Info can be used to extract the details of the Imported Objects in terms of Number of Objects Created, Altered, Ignored, Combined, etc., an d Errors encountered. This Function accepts a parameter Info Type. Syntax $$Import Info : <Info Type> The permissible values for the parameter 'Info Type' are 'Creat ed', 'Altered', 'Ignored', 'Combined' and 'Errors'. This Function returns the Number of Objects Impor ted as specified by the parameter Info Type. For instance, if the parameter 'Info Type' is specif ied as 'Created', the function returns the Number of Objects Created during the Import Process and if the Parameter contains Errors, it returns the Number of Errors enc ountered during the Import Proc ess. | TDL_Reference_Manual.pdf |
What's New in Release 4. 8 336 Example: $$Import Info : Altered This will return the total number of Objects altered during the Import Process. 2. Events Introduced 2. 1 System Events-for Object Deletio n and Cancellation Event Framework has undergone significant changes during the re cent past with the introduction of System Events 'System Start', 'System End', 'Load Company', 'Close Company' and 'Timer'. In this Release, four new System Events viz., two Events for Ob ject Deletion and two for Voucher Cancellation, have been introduced. With the introduction of these Events, w henever an Object is subject to Deletion or Cancellation, these events get triggered, which allows the TDL Programmer to take some appropriate action. Only on confirmation of Deleti on or Cancellation, these events are triggered. In other words, only when the user confirms the deletion or ca ncellation of the object by responding with a YES, the relevant events get trigge red. Irrespective of the Source of Deletion or Cancellation, i. e., f rom an external XML Request, T ally User Interface, Remote T ally User Interface, etc., the appropriate events get triggered. Any Object deletion or cancellation event gets triggered only at the Serve r end. Let us understand these System Events in detail. Delete Object Events-'Before Delete Object' and 'After Delete Object' Two new System Events Before Delete Object and After Delete Object have been introduced in this release. These events get triggered whenever any of the pr imary Objects defined in T ally Schema is deleted. For example, Object Company, Voucher, Ledger, etc. As the names suggest, the Events Before Delete Object and After Delete Object are triggered before and after the deletion of the Object, respectively. The Current Object context would be available in both these Events. Triggering of the Event After Delete Object confirms the successful Deletion of the Object. Syntax [System : Events] <Label> : Before Delete Object : <Logical Condition Expr> + : <Action Keyword> : <Action Parameters><Label> : After Delete Object : <Logical Condition Expr> + : <Action Keyword> : <Action Parameters> Where, <Label> is a Unique and Meaningful Name assigned to the System Event ha ndler. <Logical Condition Expr> is a Logical Expression, which when evaluates to TRUE, executes the given Action. <Action Keyword> is the Action to be taken once the System Event is triggered. <Action Parameters> are the parameters required for the particular Action. | TDL_Reference_Manual.pdf |
What's New in Release 4. 8 33 7 Both these events are mutually exclusive. In other words, the S ystem Event 'Before Delete Object' need not be necessarily triggered in order to trigger t he System Event 'After Delete Object', and vice versa. Example: [System : Event] Before Stock Item Deletion : Before Delete Object : $$Is Stock Item+ : Call : Before Delete Object Func After Stock Item Deletion : After Delete Object : $$Is Stock Item+ : Call : After Delete Object Func [Function : Before Delete Object Func] 00 : Log : "Before Delete Object Event starts here" 10 : Log : $Name + “under the Stock Group” + $Parent + “is being + deleted by ”+ $$Cmp User Name 20 : Log : $Master ID 30 : Log : "Before Delete Object Event ends here" [Function : After Delete Object Func] 00 : Log: “Stock Item ” + $Name + “ Deleted” In this example, the events are invoked only when the Stock Ite m Object is actually being deleted. Since the object context is available both before and after the object deletion, the object details such as Name, Master ID and Parent can be logged in either of th e events. The Event 'After Delete Object' confirms the Object Deletion. Cancel Object Events-Before Cancel Object and After Cancel Obj ect Similar to Delete Object Events, two new System Events Before Cancel Object and After Cancel Object have been introduced. Cancellation is applicable only to the Ob ject 'Voucher'. As the names suggest, the Events Before Cancel Object and After Cancel Object are triggered before and after cancellation the of the 'Voucher' object, resp ectively. The Current Object context would be available in both these Events. Triggering of the Event After Cancel Object confirms the successful Cancellation of the 'Voucher' Object. Syntax [System : Events] <Label> : Before Cancel Object : <Logical Condition Expr> + : <Action Keyword> : <Action Parameters><Label> : After Cancel Object : <Logical Condition Expr> + | TDL_Reference_Manual.pdf |
What's New in Release 4. 8 338 : <Action Keyword> : <Action Parameters> Where, <Label> is a Unique and Meaningful Name assigned to the System Event ha ndler. <Logical Condition Expr> is a Logical Expression, which when evaluates to TRUE, executes the given Action. <Action Keyword> is the Action to be taken once the System Event is triggered. <Action Parameters> are the parameters required for the particular Action Both these System Events are mutually exclusive, i. e., the Event 'Before Cancel Object' need not be necessarily triggered in order to trigger the Event 'After C ancel Object', and vice versa. Example: [System : Event] Before Vch Cancellation : Before Cancel Object : Yes : Call + : Before Cancel Object Func After Vch Cancellation : After Cancel Object : Yes : Call + : After Cancel Object Func [Function : Before Cancel Object Func] Local Formula : Str Master ID: $$String : $Master ID 00 : Log : "Before Cancel Object Event " + @Str Master ID + “starts here” 10 : Log : $Voucher Number20 : Log : $Voucher Type Name 30 : Log : "Before Cancel Object Event " + @Str Master ID + “ends here” [Function : After Cancel Object Func] Local Formula : Str Master ID : $$String : $Master ID01 : Log : “Voucher with Master ID ” + @Str Master ID + “ cancelled” In this example, the System Events Before Cancel Object and After Cancel Object are triggered the moment any voucher is cancelled. Since the object context is available both before and after the cancellation of the object, the details such as V oucher Number, Voucher Type Name, Master ID and Date of the cancelled voucher can be logged throu gh both the user defined functions. The Event After Cancel Object confirms the Voucher Object Cancellation. | TDL_Reference_Manual.pdf |
What's New in Release 4. 8 33 9 Points to remember The System Events for Object Deletion or Cancellation will be t riggered when an Object gets deleted or cancelled from any Source, viz.,from an Externa l Third Party Request, from the T ally User Interfac e or from Remote T ally. In case multiple vouchers are selected, and subsequently cancel led or deleted: The Event is triggered as many times as the number of vouchers selected. For instance, if five Vouchers are selected for Deletion in Daybook, the System Events for Deletion would be triggered five Times, once for each Voucher. Only the methods fetched in the Collection used in the Report d isplaying the list of Vouchers would be available in the Deletion or Cancellation Con text. For instance, if multiple Vouchers are selected in Daybook, only the methods fet ched in the Collection used in Daybook would be available in the current context. Howe ver, the entire Voucher Object context (including all the methods) can be associated by using the Object Association Syntax within the User Defined Function, i. e., Object: V oucher: ”ID:” + ($$String:$Master ID), and all the methods will be available in the context. In case of Remote Login, when the remote user deletes or cancel s an object, these events are triggered at the server. 2. 2 Introduction of new Object-Specific Events We are aware of object-specific events like 'Focus', 'Form Acce pt', 'Before Print' and 'After Print', which were introduced in previous releases at various User Inte rface Objects. In this Release, four new object-specific events viz., the Event Load at Report, the Event Reject at Form, the Event Accept at Field and the Event After Import Object at 'Import File' Definition, have been introduced to provide control in the hands of the TDL developer to perform any desired action, whenever these events are triggered. Let us understand these Object-Specific Events in detail. Event 'Load'-at Report Definition The Event Load has been introduced at the 'Report' Definition. This event is t riggered before the Report is displayed to the user. In other words, when this event is triggered, the Report is constructed and updated with variables, object context and the data. The Event 'Load' provides control to the TDL Layer, before T ally gets into wait loop, where the user will start op erating on the Report. It may allow storing of the current state, etc. Syntax ON: Load : <Condition Expr> : <Action Keyword> : <Action Parameters> Where, <Logical Condition Expr> is a Logical Expression, which when evaluates to TRUE, executes the specified Action. <Action Keyword> is the Action to be executed, once the System Event is triggere d. <Action Parameters> are the parameters required for the given Action. | TDL_Reference_Manual.pdf |
What's New in Release 4. 8 340 Example: [#Report : Profitand Loss] On : Load : @@Is Loss Incurred : CALL : Show Msgif Loss Encountered In this example, once the user loads or displays the report Profitand Loss, the 'Load' event invokes the Function Show Msgif Loss Encountered, if the System Formula Is Loss Incurred evaluates to TRUE. Event 'Reject'-at Form Definition The Event Reject has been introduced at the 'Form' Definition. This event gets e xecuted in the Edit Mode, when the user quits the current Form without accepti ng or saving it. It allows the Programmer to perform the desired action on rejection of the Fo rm. Once the Event 'Reject' is used at the Form Definition, the default Action 'Form Reject' is ove rridden, as a result of which, the action Form Reject has to be explicitly specified. Syntax ON : Reject : <Condition Expr> : <Action Keyword> : <Action Parameters> ON : Reject : <Condition Expr> : Form Reject Where, <Logical Condition Expr> is a Logical Expression, which when evaluates to TRUE, executes the given Action. <Action Keyword> is the Action to be taken, once the System Event is triggered. <Action Parameters> are the parameters required for the given Action. Example: [#Form : Accounting Voucher] On : Reject : Yes : Call : TDLReject Func On : Reject : Yes : Form Reject [Function : TDLReject Func] 00 : Msg Box : Status : "The form is rejected" In this example, when the form is rejected, the Function TDLReject Func is invoked, which displays the message “The form is rejected”. Once the execution of the function is over, the form gets rejected due to the explicit Action 'Form Reject'. Event 'Accept'-at Field Definition The Event 'Accept' has been introduced at the Field Definition. This event gets executed the moment an editable Field is accepted. Once the Event 'Accept' i s used at the Field Definition, the default Action 'Field Accept' is overridden, as a result of which, the action 'Field Accept' to accept the Field contents, has to be explicitly specified. When a Field is accepted, the event sequence runs in the follow ing order: | TDL_Reference_Manual.pdf |
What's New in Release 4. 8 34 1 1. The Field value is validated through the 'V alidate' attribute 2. The 'Modifies' V ariable is modified/updated. 3. The Event 'Accept' is executed 4. The Sub-Form is invoked Syntax ON : Accept : <Condition Expr> : <Action Keyword> : <Action Parameters> ON : Accept : <Condition Expr> : Field Accept Where, <Logical Condition Expr> is a Logical Expression, which when evaluates to TRUE, executes the given Action. <Action Keyword> is the Action to be taken, once the System Event is triggered. <Action Parameters> are the parameters required for the given Action. Example: [#Field : Qty Primary Field] On : Accept : @@Is Negative Clos Qty : Call : Msg Boxfor Negative On : Accept : @@Is Negative Clos Qty : Field Accept Here, the event Accept is triggered on accepting the Field Qty Primary Field, which in turn, invokes the function Msg Boxfor Negative. Once the function terminates, the field is accepted. Event 'After Import Object'-at Import File Definition A new Event 'After Import Object' has been introduced to empowe r the TDL programmers to perform some action every time an Object is imported. This Even t helps to create appropriate logs after Importing each Object, or terminate the Import Process ba sed on some condition. 3. Action Enhancements 3. 1 Function Actions Batch Posting Actions-ST ART BA TCH POST and END BA TCH POST The introduction of User Defined Functions in TDL has empowered the TDL Programmers with one of the most important needs, i. e., Automation of Data Entry. Irrespective of the data source, If the validation fails, then this event will not be executed, as it will result in an error to the user. For more details about the Event 'After Import Object', including the syntax and example, refer to the first topic 'Data Importing Enhancements'. | TDL_Reference_Manual.pdf |
What's New in Release 4. 8 342 one can make use of User Defined Functions to update the databa se without much user intervention. However, in comparison to Import of Data through XML/SDF Files, updation of data through User Defined Functions takes a much longer time. A performance lag has been observed while updating data with User Defined Functions, as compared to updat ing data of a similar size by the Import method. In order to give a uniform user experience and b etter performance, the approach followed in data import has now been extended to data updation through User Defined Functions. Importing of Data implicitly follows a Batch Posting approach, wherein the data to be incorporated in the database is updated in batches, thereby improving the pe rformance. This approach has now been extended to data updation through User Defined Functio ns, with the introduction of two new Actions, namely ST ART BA TCH POST and END BA TCH POST. Batch Posting Mode accumulates sets of Objects into batches, and pushes a whole ba tch of data into the database at a time, which optimizes the performance. Batch Posting Mode also requires the size of the Batch, which can be set as a parameter to the Action ST ART BA TCH POST. Actions-ST ART BA TCH POST and END BA TCH POST The Actions ST ART BA TCH POST and END BA TCH POST are procedural actions which can only be used within User Defined Functions. These Actions indicate t hat all the Data Updation Actions falling between the Actions ST ART BA TCH POST and END BA TCH POST m u s t b e updated to the database in Batches. Instead of the data being d irectly updated to the database, the data is updated to a temporary file, and once the Batch Siz e limit is reached, the entire data is flushed from the temporary file into the database. A Batch is a set of objects, wherein the batch size can be spec ified by the TDL Programmer as an optional parameter to the Action ST ART BA TCH POST. In the absence of this parameter, t h e default size of the batch is considered as 1 00 Objects. On encountering the batch size limit, the temporary file posts/flushes the data into the T ally database. On completion of the posting of the previous batch of data, the subsequent batch posting iteration takes place, and this cycle continues till the entire data is updated to the database. The bigger the batch size, the lesser the total number of batches, and the better the performance. The op eration will be accomplished faster if the Batch Size specified is optimal. A very high Batc h Size, beyond a particular point, may also deteriorate the performance. Hence, striking the right balance and specifying the optimal batch size is important to achieve the best performance. Syntax START BATCH POST [:<Batch Size>] NEW OBJECT: <Object Type>: <Object Name> : <Forced Update Flag> Action 1 Action 2 : : Action n SAVE TARGET END BATCH POST Where, | TDL_Reference_Manual.pdf |
What's New in Release 4. 8 34 3 <Batch Size> is the size of each batch. Example: [Function : Create Ledgers] Parameter : p Numberof Ledgers : Number : 1000 000 : START BATCH POST : 500 010 : For Range : i : Number: 1: ##p Numberof Ledgers 020 : New Object : Ledger 030 : Set Value : Name : “Customer " + $$String:##i 040 : Set Value : Parent : "Sundry Debtors" 050 : Create Target 060 : End For 070 : END BATCH POST In this example, when the Functi on “Create Ledgers” is invoked, 1000 Ledgers, ranging from “Customer 1” to “Customer 1000”, are created under the group 'S undry Debtors'. If the Batch Posting feature was not used, the database files would get lock ed and released for updating every object, and this would continue till all the Objects were updat ed. Thus, 1000 cycles would take place, affecting the performance adversely. However, with Batch Posting approach, these Objects are updated in 2 batches of 5 00 Objects each, i. e., the database is locked and released only twice, thus improving the performance vastly. The impact of this enhancement can be observed during updation of data of large volume. For instance, the foll owing table shows the statistics of time taken for creating 1000 ledgers using the given code, but with different Batch Size: Table 1. Batch Posting Statistics In the absence of Action END BA TCH POST, the End of the User Defined Function is assumed as the end of Batch Posting. However, it is recommended to specify END BA TCH POST, especially in presence of nested loops/ large volume of data. Particulars Batch Size Approx. time taken Without Actions START BATCH POST and END BATCH POST NA 3 Minutes 29 Seconds With Actions START BATCH POST and END BATCH POST 100 4 Seconds 500 2 Seconds 1000 1 Second | TDL_Reference_Manual.pdf |
What's New in Release 4. 8 344 As seen in the table, with the usage of the Actions ST ART BA TCH POST and END BA TCH POST, the time taken reduces significantly. Also, it is noticed that with increase in the Batch Size, the performance keeps improving. The operation will be accomplished faster if the specified Batch Size is equal to the total number of Objects being updated, i. e., in this case, specifying the Batch Size as 1000 will give optim al performance as 1000 objects will be p osted to the database at a time. Limitation Greater the Batch Size, better the performance of data updation. However, the database files are locked from the beginning till the end of the write o peration of each Batch. This results in unavailability of the Database for data updation fro m other sources executing parallelly, like data entry in a Multi-User Environment, Data Synchronization, etc. Thus, a higher value of Batch Size will improve the performance, but wi ll slow down the simultaneous updation of Data. Hence, determining the Optimal B atch Size is necessary to strike the right balance for getting the best performance. A very high Bat ch Size, beyond a particular point, may deteriorate the performance. Points to remember Actions ST ART BA TCH POST and END BA TCH POST are not be used in a nested manner. If used so, only the first instance is considered, while the remaining ones are ignored. A Batch can only be ended or closed in a Function where it is i nitiated. If the user misses the closing part, the System will END the batch implicitly. One must backup the data prior to using the Batch Posting Feature, as incorrect usage of the same may lead to corruption/loss of data. For Import of Data also, we have a parameter similar to Batch S ize, i. e., Import Batch Size, which can be used to improve the performance while Importing Da ta. This parameter can be specified in T ally. INI, in the absence of which, it is s et to 1 00 by default. Setting this parameter to a higher value will decrease the time taken for Im port, but will increase the wait time for other simultaneous data updation operations. Sett ing it to-1 will disable the Batch Posting feature for Import of Data, which means that the Data Import would consume a longer time, as every Object would need to be updated to the database individually. Asynchronous Message Box Actions-ST ART MSG BOX and END MSG BOX These are asynchronous message boxes, i. e., the message box con tinues to appear till the action 'End Msg Box' is encountered or the function is terminated, whi chever is earlier. Unlike action 'Msg Box', this action is executed asynchronously, i. e., it does not expect a key press from user. When executed, it displays the message box, and continues to ex ecute the subsequent Actions. Syntax Start MSG BOX : <Title Expression> : <Message Expression> <Action 1> : <Action n> End MSG BOX Where, <Title Expression> is the value that is displayed on the title bar of the message window. | TDL_Reference_Manual.pdf |
What's New in Release 4. 8 34 5 <Message Expression> is the actual message displayed in the box. It can be an expres sion as well, i. e., the variable values can be concatenated and displayed in the d isplay area of the box. Example: [Function : Msg Box Actions] Variable : Counter : Number Variable : Total Count : Number : 100 Returns : Number Local Formula : Str Total Count : ($$String : ##Total Count) Local Formula : St Counter : ($$String : ##Counter) 00 : Start Msg Box : Status : "This Function creates” + + @Str Total Count + “Ledgers” 10 : Start Progress : ##Total Count : ##SVCurrent Company : + "Creating Ledgers" : "Please wait" 20 : While : ##Counter < ##Total Count 30 : New Object : Ledger : "Ledger" + @Str Counter : Yes40 : Set Value : Name : "Ledger" + @Str Counter 50 : Set Value : Parent : "Sundry Debtors" 60 : Save Target70 : Increment : Counter80 : Show Progress : ##Counter 90 : End While 100 : End Progress 110 : End Msg Box Here, the action 'Start Msg Box' invokes the message box and re tains it till action 'End Msg Box' is encountered. Thus, the message box will continue to appear from label 00 to 1 10. In absence of 'End Msg Box', the msg box is automatically terminated when the Function Msg Box Actions ends. If nested Start Msg Box is executed, then the previous Message box is overwritten. At any time, only one Message Box can be displayed. | TDL_Reference_Manual.pdf |
What's New in Release 4. 8 346 3. 2 System Actions Action-Load TDL An Action 'Execute TDL' was introduced in Release 3. 6 to load a TDL dynamically, execute some action, and then unload the TDL or keep it, depending on the Lo gical V alue. With this Action, the TDL would get loaded. However, the execution of action was mandatory. In Release 4. 8, an action 'Load TDL' has been introduced to load the TDL/TCP dynamically for only the current session of T ally. However, if the TDL File is already loaded due to being specified in T a lly. INI, or through previous execution of the Action 'Load TDL'/'Execute TDL', it w ill not be loaded again. On closing the current session of T ally. ERP 9, the dynamically loaded file (s) will not be available for the subsequent T ally Session. Syntax LOAD TDL : <TDL/TCP File Path Expression> Where, <TDL/TCP File Path Expression> evaluates to the path of the TDL/TCP File to be loaded dynamically. Example: [Button : Load Dynamic TDL] Key : Alt + L Action : Load TDL : @@TDLFile Path [System : Formula] TDLFile Path : “C:\Tally. ERP9\TDL\Samples. tcp” In this example, on triggering the button 'Load Dynamic TDL', t he action 'Load TDL' loads the TDL from “C:\T ally. ERP9 \TDL\Samples. tcp”. If this TDL is already loaded due to being sp ecified in Ta l l y. INI, or previous execution of the Action 'Load TDL', then the s ame will not be loaded again. Action-Unload TDL T o unload the TDL dynamically from the current T ally Session, t he Action 'Unload TDL' has been introduced. With this Action, the local TDL File(s), including the ones added through T ally. ini and those added dynamically using Actions 'Load TDL' or 'Execute TD L', can be unloaded. However, they would be unloaded only for the current T ally Session, and in the subsequent session, all the TDL/TCP files specified in T ally. INI will be loaded once again. Using this action, the Files can be unloaded by specifying either the TDL /TCP file name or the GUI D of the TCP File. Syntax UNLOAD TDL : <TDL/TCP File Path Expression or GUID Expression>Local TDLs will be loaded at the Remote End if 'Allow Local TDLs' is enabled to the user logged in. | TDL_Reference_Manual.pdf |
What's New in Release 4. 8 34 7 Where, <TDL/TCP File Path Expression or GUID Expression> evaluates to the path of the TDL/TCP File or GUID of the TCP File to be unloaded dynamically. Example: [Button : Unload Dynamic TDL] Key : Alt + U Action : Unload TDL : @@TCPFile GUID [System : Formula] TCPFile GUID : “c29 01088-349b-434b-946c-9ada601fd6b7” In this example, on triggering the button 'Unload Dynamic TDL', the Action 'Unload TDL' unloads the Compiled TDL with the GUID “c2901088-349b-434b-946c-9ada601 fd6b7”. If the particular TDL is not found to be loaded, then the same is ignored. If the TCP File was dynamically loaded, then the same is removed from the List of TDL Files. However, if the TCP File was available in Ta l l y. INI, then the same is removed temporarily and reloaded in the s ubsequent session of T ally. 4. Function Enhancements 4. 1 Function-$$Is TDLLoaded A new function 'Is TDLLoaded' has been introduced to check if a particular TDL is already loaded. This function returns TRUE if the particular TDL/TCP file is al ready loaded, and FALSE if it is not. Based on the result of this function, further actions like Load ing and Unloading of TDL, o r executing a Report from the dynamically loaded TDL File, etc., can be performed. Syntax $$Is TDLLoaded : <TDL/TCP File Path Expression or GUID Expression> Where, <TDL/TCP File Path Expression or GUID Expression> evaluates to the path of the TDL/TCP File or GUID of the TCP File to be checked, whether it is loade d or not. Example: [Function : Display First TDL Report] 00 : If : $$Is TDLLoaded : @@TCPFile GUID 10 : Display : First TDL Report 20 : Unload TDL : @@TCPFile GUIDAccount/Remote TDL file(s) cannot be unloaded using Action 'Unload TDL'. Once a TDL is unloaded explicitly, if one attempts to load such TDL file(s) by changing the TDL Configurat ion, the file(s) will not be loaded in that session. | TDL_Reference_Manual.pdf |
What's New in Release 4. 8 348 30 : End If [System : Formula] TCPFile GUID : “c2901088-349b-434b-946c-9ada601fd6b7” In this example, if the TDL with GUID “c2901088-349b-434b-946c-9ada601fd6b7” is loaded, then the Report 'First TDL Report' will get displayed. Subsequently, the TDL is unloaded. 4. 2 Function-$$Http Info It is used to get the details of URL Host, Content Length and He ader information available during the receiving of the SOAP request. It accepts two parameters-'Info Type' and 'Info Sub Type'. 4. 3 Function-$$Import T ype The Function $$Import Type is used to determine the type of Impo rt, i. e., the source of data. The possible Import Types could be 'Sync', 'Migration', 'Remote', ' Nat Lang', 'SOAP' or 'Manual'. 4. 4 Function-$$Import Action This function is used to indicate the status of Import, i. e., whether the current Object was Created, Altered, etc. The possible results are 'Created', 'Altered', 'I gnored', 'Combined', and 'Error'. 4. 5 Function-$$ Last Import Error The Function $$Last Import Error can be used to extract the Impor t error description for the last object imported, which is helpful to retrieve after every impor t, and appropriate error logs can be maintained and displayed at the end of the Import Process. In c ase there is no Error while Importing the current Object, it would return the value as 'Emp ty'. 4. 6 Function-$$Import Info The Function $$Import Info is useful to extract the details of t he Imported Objects in terms of Number of Objects Created, Altered, Ignored, Combined, etc., an d Errors encountered. This Function accepts a parameter 'Info Type'. 5. New Objects and Collection Attributes to support Banking T o support Banking, two new Primary Objects, i. e., objects of Type 'Pay Link' and 'Party Pay Link' have been introduced. These Objects are similar to Bills, i. e., with each transactio n by individual payment modes like 'Cheque', 'Inter-Branch Transfers', etc., a 'Pay Link' object is created with respect to Bank and a 'Party Pay Link' object is created with r espect to transaction to Party. Along with the Object Types 'Pay Link' and 'Party Pay Link', th ree new attributes have been introduced for the 'Collection' definition. These attributes ca n be used for accessing the appropriate indexes within the collection to fetch the data. They are prima rily used in the banking module. For details of the functions $$Http Info, $$Import T ype, $$Import Action, $$Last Import Error and $$Import Info, refer to the section 'Data Importing Enhance-ments'. | TDL_Reference_Manual.pdf |
What's New in Release 4. 8 34 9 5. 1 Collection Attribute-Transaction T ype This attribute filters the transactions based on the Link maste r Transaction type. It accepts Sys Name as parameter to identify the type of banking transactio n, e. g., 'Cheque', 'Credit Card', 'Inter-Bank Transfers', etc. It is applicable only for collecti ons of Type 'Pay Link'/'Party Pay Link'. Syntax [Collection: <Collection Name>] Transaction Type: $$Sys Name:<Type Of Transaction> Where, <T ype of transaction> is the link master transaction type used in banking. It can be Cash, Cheque, A TM, ECS, Cheque/DD, Interbank Transfer, Same Bank Transfer, Electronic Cheque and Electronic DD/PO. 5. 2 Collection Attribute-Primary Status It filters the transactions based on the (Primary) Status of Ba nking transactions stored in Link Master against each transaction. It accepts Sys Name as paramete r, such as 'Returned', 'Cancelled', etc. It is applicable only for Collections of Type 'Pay Link' or 'Party Pay Link'. Syntax [Collection : <Collection Name>] Primary Status : $$Sys Name:<Status Parameter> Where, <Status Parameter> is the primary status of each transaction. It can be 'Status Tra nsacted', 'Unstable', 'Cancelled' and 'Returned'. 5. 3 Collection Attribute-Secondary Status This attribute filters the transactions based on the additional status of each transaction type. It accepts Sys Name as Parameter, such as 'Exported', 'Approved', 'Not Approved', etc. This is applicable only for Collections of Type 'Pay Link'. Syntax [Collection : <Collection Name>] Secondary Status : $$Sys Name : <Status Parameter> Where, <Status Parameter> is the secondary status of each transaction. It can be 'Exported', 'Approved', 'Not approved' or 'Primary'. Example: [Collection : Pay Link Coll] Type : Pay Link Child of : "ICICI" Transaction Type : $$Sys Name:NEFT Primary Status : $$Sys Name:Status Transacted | TDL_Reference_Manual.pdf |
What's New in Release 4. 8 350 Secondary Status : $$Sys Name:Not Approved Fetch : * Here, the Collection Pay Link Coll consists of Objects of Type Pay Link. The transaction type filters the collection of Type 'Pay Links' for transactions onl y of type NEFT, that are filtered with primary status as 'Status Transacted' and secondary status as ' Not Approved'. 6. Miscellaneous Enhancements 6. 1 HTTP Log Changes Hyper T ext Transfer Protocol, commonly referred to as HTTP, is a communication protocol which is used to deliver data on the World Wide Web. In other words, HTT P provides a standardized way for computers to communicate with each other. HTTP specification includes information about how the client's request data will be constructed, how it will be sent to the server and how the server should respond to these requests. T ally. ERP 9, being the complete business solution, also support s HTTP Protocol for exchanging messages between T ally and any Third Party Application. During interactions with the Third Party Applications, T ally. ERP 9 can act as a Client, as a Server or b oth. As a Client, T ally. ERP 9 constructs appropriate requests in XML Format, sends the same to the specified URL Host, i. e., the Server, which could be any Third Party Application, including T ally. It then receives the response from the Server over HTTP. A s a S e r v e r, T ally acts as per the incoming request from any Third Party Client, generates an XML Response and sends it to the Client. Usually, except the default T ally-to-T ally Data Synchronization, the Integration solutions are built by the TDL Programmer. While building such a solution, they require some debugging tools like logs to confirm if the righ t requests and responses are be ing communicated over HTTP. Enable HTTP Logs in Developer Mode A Configurable option is provided in T ally to log all the Infor mation exchanged over HTTP, which if enabled, records the Request/Respons e communication between T al ly and external applications. This helps the developers to debug and resolve the issues, if a ny, while setting up integrated solutions. HTTP Log information would be written to the file T a lly HTTP. Log in the working T ally Application Directory. Previously, though this log was mainly used for development and debugging purposes, it was also available in the Normal Mode ( R e l e a s e M o d e ). D u e t o this, HTTP Requests/Responses would be unnecessarily logged for the users of T ally. ERP 9, who were usually not even consuming those logs. Also, it would needlessl y consume some amount of time to update the HTTP Log on each occasion. Hence, from Release 4. 8 onwards, 'Enable HTTP Log' Option has been removed from the Normal Mode of T ally. ERP 9, and will be available only in the Developer Mode. In other words, the T ally. ERP 9 users cannot see and enable HTTP Logs through the Advanced Configuration Screen (F12) in Normal Mode. | TDL_Reference_Manual.pdf |
What's New in Release 4. 8 35 1 However, for development and debugging purposes, the same can be seen and enabled by the Developers/Integrators, while running T ally. ERP 9 in Developer Mode. Silent HTTP Exchange At times, programmers would not want to log certain sensitive H TTP Information, inspite of HTTP Logs being enabled in Developer Mode. In order to explicitly co ntrol the Logs, the requestor can additionally send a Header DISABLELOG, set to YES, which will disable the current log, irrespective of the Configuration or the Mode in which T ally is running. The default value is NO, i. e., in the absence of this Header, the HTTP Information will be logged to the file T ally HTTP. log, if T ally. ERP 9 is working in Developer Mode and HTTP Log is enable d in Configuration. Figure 2 Silent HTTP Exchange In the above figure, we can see that the Header Disable Log is set to NO, due to which the information exchange between T ally and external application has been logged. If Disable Log would have been set to YES, then irrespective of T ally being run in Developer Mode and 'E nable HTTP Log' option being enabled, the HTTP information would not be logged to T ally HTTP. Log. 6. 2 Retrieving Original UDF Index No. of a Data within Associated Objects A UDF can be used to store additional information into the T all y database. UDFs are stored in the current object context. Whenever a UDF is created and used in a n already existing report, the data is stored in the context of the current object, i. e., it i s always associated to the object to which the report is associated. Previously, if the TDL or the TCP was lost or corrupted, then there was no way by which we could know the UDF details like the UDF Number, and hence, the retrieval of data related to the UDF was quite difficult. In the present Release, an XML attribute Index, within the UDF 'List T ag', has been introduced to help retrieve the original UDF number corres ponding to the data available within the Objects associated with it. This UDF number will be available in the Index attribute in T ally Application can be executed in Developer Mode, using the parameter Dev Mode. For instance, if the T ally Application is installed in C:\T ally. ERP 9, then it can be executed in Developer Mode as C:\Tally. ERP9\Tally. Exe /Dev Mode. | TDL_Reference_Manual.pdf |
What's New in Release 4. 8 352 the UDF List T ag, even when the TDL is not attached or is unava ilable. The Index attribute will be available for Simple as well as Aggregate UDFs. Example: <UDF:TESTUDFNO. LIST DESC="'Test UDF No'"ISLIST="YES" TYPE="String" INDEX="1010"> <UDF:TESTUDFNO DESC="'Test UDF No'">Raam</UDF:TESTUDFNO></UDF:TESTUDFNO. LIST> Here, the UDF number (1010) is displayed under the 'Index' Attr ibute in the UDF List T ag. 6. 3 Date Limit Extended and Pref ix Century Behav iour Introduce d Till now, the Date data type used to support values from 1-1-1901 to 1-1-2099. From this release onwards, the support has been extended to the date 31-1 2-9999. Also, the following prefix century behaviour has been introduced (wh en a 2 digit year value is entered by the user) in the Date field. The century val ue prefixed by the system will depend upon (i) the 2-digit year value passed by the user (ii) the system year. Thus, the different cases that are possible are as follows. Case I: The year entered by the user is greater than or equal to 50 Case II: The year entered by the user is less than 50 When the current year as per the system date is greater than or equal to 50 In this case, the system will consider the year entered to be belonging to the same century as the system date. Example: If the System Date is 1-1-2098, then if the user enters 86, it will be considered as 2086, i. e., of the same century as in system year. The system will consider the year entered to be belonging to the next century compared to the system date. Example: If the System Date is 1-1-2098, then if the user enters 24, it will be considered as 2124, i. e., of the next century compared to system yr. When the current year as per the system date is lesser than 50 The system will consider the year entered to belong to the previous century compared to system date. Example: If the System Date is 1-1-2014, and the user enters the year as 86; the system will consider it as 1986, i. e., of the previous cen-tury. The system will consider the year entered by the user to belong to the same century as the system date. Example: If the System Date is 1-1-2014, then if user enters 24; it will be considered as 2024 i. e. of the same century as system year. | TDL_Reference_Manual.pdf |
353 What's New in Release 4. 7 Following are the highlights of language enhancements in this R elease, which have been discussed ahead in detail: 1. In Developer Mode, enhancements like creation of log files in Excel format, enriched Key Recording/Playback, and introduction of new Calculator Pane Com mands, have been made. 2. Event Nat Lang Query has been introduced to pass control to the TDL program, when a request is received by way of SMS or Calculator Pane commands. 3. Zip/Unzip Capability has been introduced, which allows compression/ decom pression of files. Password protection is also supported. 4. Editing capability has been extended to Columnar Reports. 5. New data types Date, Date Time and Duration have been introduced, which along with the existing data types 'Date' and 'Due Date', are now collectively called as Calendar data types. 1. Developer Mode Enhancements In market, there are customers using T ally. ERP 9 for their day-to-day operations and also developers or partners who build solutions for the customers. T o empower the developers of Ta l l y w i t h various tools to builds solutions efficiently, a new capability to operate T ally in the Developer Mode was introduced in Release 4. 6. In other words, capability was i ntroduced to operate T ally in two modes, viz., Normal Mode, to be used by the End Users and Developer Mode, to be used by the TDL Developers. Through the Developer mode, a host of Developer T ools have been offered for debugging the code, optimizing t he performance of customized reports, recording the user operations and playing them back, e tc. T o further enrich the Developer Mode experience, following enhancements have been incorporated in this release. 1. 1 Output Profiler and Expres sion Diagnostics Information in Excel Format Microsoft Excel is widely used in organizations for representin g their T abular data, as it comes with a galaxy of features for data representation. It is, there fore, ideal to output any tabular data in Microsoft Excel format, for easier and better data analysis. From Release 4. 7, the tabular Profiler or Debugger Expression d ata will dump the information in Excel Format, to enable the developer to analyze the data with ease. The behaviour will be: If the System has MS Office 20 07 or below, then the output format will be '. xls'. If the System has MS Office 201 0 or above, then the output format will be '. xlsx'. If the System does not have MS Office installed, then the behav iour will be the same as in Release 4. 6, i. e., the format will be text files. Thus, the developer can make use of Excel features like sorting, filtering, graphical representation, etc., thereby attaining performance optimization quickly. For example, by sorting | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 354 the Profiled Information in descending order of Time or Count, the developer can quickly determine the artefact that has taken the longest time or the Collection that has been needlessly gathered multiple times, thus optimizing the performance quickly. 1. 2 Key Recording and Playback Changes With respect to Key Recording an d Playback, following enhanceme nts have been done: Reading Capacity Increased In Release 4. 6, when a Macro gets recorded beyond 20 00 characters, it is not possible to read back the characters beyond 2000 using the Function $$File Read, and play them. From Release 4. 7 onwards, the reading capacity of the Function $$File Read has been increased to 4000 characters per line. Splitting of Macros Again, if the Macro gets recorded beyond 4 000 characters, the Function $$File Read cannot read further, which means that Keys beyond 4000 characters cannot be played back. Hence, the Macro Recording capability has been enhanced in such a way that after recording 4000 characters, a new macro gets created automatically, and the subsequent keys are recorded in the new macro. The new macro will bear the same macro name, with a number concatenated to it. All the Macros created will be dumped in a single file, and replayed when required. Thus, n number of macros can be recorded in a file, read and played bac k. For example, if the Name of the Macro is Te s t i n g, then after every 4000 characters, a new Macro is created with the Name T esting-1, Te s t i n g-2,... T esting-n. Thus, there is no limit to the number of characters which can be recorded, read and played back. Action 'Dump Recording' with a File Name In Release 4. 6, using the Action Dump Recording, all the Keys, along with the Macro Name, were written to a file Macros. Log, by default. From Release 4. 7 onwards, the Action 'Dump Recording' has been enhanced to write the macros to a File specified by the user. The Action 'Dump Recording' will accept 2 optional parameters, viz. File Name and Separator. If the File Name is left unspecified, then by default, the Action would dump the recording to the file Macros. log. If the Separator is left unspecified, then by default, the system would consider Tilde (~) as the default separator. Syntax Dump Recording [: <File Name> [: <Separator between keys>]] Where, <File Name> is the name of the file where macro and keys will be recorded. <Separator between keys> is the separator used to differentiate the macro name from the keys. Example: [Button : Dump Recording] Title : "Dump" | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 35 5 Key : Alt + U Action : Dump Recording : “BSView. txt” : “-” On clicking the Button 'Dump Recording', a file BSView. txt is created in T ally Application Folder. Action 'Trigger Key' Enhanced When the macro keys are recorded using Key Recording Actions or when they are dumped into the Macros File from the Calculator Pane; in order to play them back, one needs to make use of the Action Trigger Key, which sends a list of keys in sequence to the system as if an operator is pressing those Keys. Very often, some keys like Enter, Up, Down, etc., are repeated in sequence more than once. For example, to scroll down to the 7th Voucher in Daybook, one needs to trigger the Down Key 6 times. Similarly, in an Invoice Entry, moving to the first Item field needs multiple hits of Enter key. Hence, the action 'Trigger Key' has now been enhanced to suppor t the <Key>:<Number> combination in the syntax, which will trigger the particular Key for the specified Number of times. Example: 1 Trigger Key : DD, Enter : 5, “Item 1”, Enter This is the same as: Trigger Key : DD, Enter, Enter, Enter, Enter, Enter, “Item 1”, Enter Following happens when the above Action is invoked from Gateway of T ally: The First D navigates us to Display. The Subsequent D navigates us to Daybook. Enter:5 triggers the Enter Key 5 times, i. e., Drills down into the current voucher, accepts 4 subsequent non-skipped fields, and moves to the 5th non-skipped Field in the Voucher. In the Fifth field, the text Item 1 is entered. The Subsequent Enter then accepts the current field, and the focus is shifted to the next non-skipped field. Example: 2 Trigger Key : DS, Enter:3 This action will take us through Display (D)-> Statement of Accounts (S)-> Outstandings (1st Enter)-> Receivables (2nd Enter) ; the 3rd Enter selecting the first item in the list and displaying all the outstanding bills within it. The behaviour of Calculator Pane Command Dump is retained as in Release 4. 6, i. e., it will create a file with the name Macros. Log in the T ally Application Folder. | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 356 1. 3 Calculator Pane Changes For the convenience of the developer, certain calculator pane commands have been introduced in this Release. Command-Mode: ? Mode: ? will list all the modes available in the Calculator Panel. Figure 1. Command Mode: ? Command-Help From any of the modes, Help command will list down all the supported commands for the parti cular mode, along with their purpose. Figure 2. Command Help Command-Open From any of the modes, the Open command will open the most recently logged file. Consider the following examples: If the current mode is Debug, the file being opened will be either debug. xlsx, debug(1). xlsx, debug(2). xlsx,....... or debug(<n>). xlsx, whichever is the most recent in debugger log. (Depending on the available Excel Version, the file extensions will vary. ) If the current mode is Profile, the file being opened will be ei ther tdlprof. xlsx, tdlprof(1). xlsx, tdlprof(2). xlsx,....... or tdlprof(<n>). xlsx, whichever is t he most recent in profiler log. (Depending on the available Excel Version, the file extensions will vary. ) If the current mode is Record, the file being opened will be macros. log. | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 35 7 Figure 3. Command Open Figure 4. Macros. log File 2. Event 'Nat Lang Query' Introduced As we are already aware, T ally has a natural language processin g capability which accepts queries either from the Calculator Pane or from SMS Request. T a lly has the intelligence of parsing received/ given commands, in order to process the same. This pa rsed information is used by the system to process the query and deliver the result. However, in certain cases, queries received might not be understood by the system. There have also been req uirements in the market to support data updation queries like Ledger, Voucher Creation, etc. In order to cater to the above requirements, a new System Event Nat Lang Query has been introduced. This event gives comp lete control in the hands of t he TDL Developer, thereby enabling him to process the query received and do the needful. If the qu ery is ignored by TDL, then the System continues to process it and provide the response as usua l. Syntax [System : Event] <Event Name> : Nat Lang Query : <Condition> : <Action> : <Action Parameters> Where, <Event Name> can be any unique name, indicating the purpose of the event. <Condition> if evaluated to TRUE on receiving a query, an action will be executed. <Action> is the Action Call which can be used for processing the Query r eceived/given. <Action Parameters> can be a Function Name and its required Parameters. | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 358 Example: [System: Event] Ledger Creation: Nat Lang Query: @@Is Ledgerin Query: Call: Create Ledger Whenever a Query is received, T a lly checks the logical conditio n @@Is Ledgerin Query. If it evaluates to TRUE, then the function 'Create Ledger' is invoked. In order to support the event “Nat Lang Query”, the following Sys tem V ariables, along with a Built-in TDL Function $$Nat Lang Info, have been introduced. 2. 1 System Variables Introduced SVNat Lang Full Request This is a String V ariable bearing the complete request / query string when a Query is received. SVNat Lang Request This is a String V ariable bearing the part of the query that is not understood by the system. SVNat Lang Response This is a String V ariable which carries the response back to th e requestor. After processing the Query, this variable needs to be set with an appropriate response tha t is sent back to the requestor by T ally. SVNat Lang Request Processed This is a Logical V ariable which denotes the status of the Quer y Processed. After processing the Query, this variable needs to be set to YES to indicate if the Query was processed by TDL successfully. Update YES to indicate that the Query is processed by TDL and the response is prepared. Update NO to indicate that the Query is not processed / understood by TDL. If updated as YES, then only the system will send the response specified in TDL. If updated as NO, the System processes the Query and sends the appropriate re sponse. 2. 2 Built-In TDL Function '$$Nat Lang Info' Introduced A Built-In TDL Function $$Nat Lang Info has been introduced to provide certain information like Company Name, User Name, From Date, T o Date, etc., from the Query received. Syntax $$Nat Lang Info : <Info Type> The valid values for <Info T ype> are as follows: Company User Name In the given syntax, <Action> can be any gl obal Action like Display, Alter, Print, etc. However, Nat Lang Query being a query from a remote location, it is not advisable to populate any report in the User Interface of T ally at the Server end. | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 35 9 From Date To D a t e Object Name Example: $$Nat Lang Info:Company returns the current Company Name. $$Nat Lang Info:User Name returns the Name of the User from whom the Query is received. If the request is from Calculator Pane, T ally responds with the current logged in user name. If the request is initiated through an SMS Query, T ally responds with the name of the T ally. NET User from whose device, the request is received. $$Nat Lang Info:From Date returns the From Date of the period, based on the received query or from the recent context. $$Nat Lang Info:T o Date returns the T o Date of the period, based on the received query or from the recent context. $$Nat Lang Info:Object Name returns the Name of the Object, based on the received query or in the recent context. For example, if Query received is-“Sales for April 2013”, th en Nat Lang Info will return the following: Object Name-Sales From Date-1-April-2013 T o Date-30-April-2013 2. 3 Example to Demonstrate “Nat Lang Query” event Create Ledger Radhe Shyam Sundry Debtors Requirement The requirement here is to create a Ledger with the name 'Radhe Shyam', under the Group 'Sundry Debtors'. Implementation1. Firstly, we need to write a system event to trap the query received and perform the necessary action. [System : Event] Create Ledger : Nat Lang Query : @@Is Create Ledger : Call : Create Ledger 2. If the Request contains 'Create Ledger', then only the above action is to be performed, so the following system formula needs to be declared to check the valu e of the variable SVNat Lang Full Request. [System : Formula] Is Create Ledger : ##SVNat Lang Full Request CONTAINS “Create Ledger” 3. When the action is being execut ed, firstly we need to tokeniz e the words from the string: [Function : Tokenize Query] 000 : List Delete Ex : SMSStrings | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 360 010 : For Token : Token Var : ##SVQuery Request : " " 020 : List Add Ex : SMSStrings : ##Token Var 030 : End For [System : Variable] List Var : SMSStrings : String 4. Finally, create the ledger with the Action 'New Object' [Function : Create Ledger] 000 : Call: Tokenize Query 010 : New Object : Ledger : ##SMSStrings[3] : Yes 020 : Set Value : Name : ##SMSStrings[3] 030 : Set Value : Parent : ##SMSStrings[4] 040 : Save Target 5. Send the Response to the source of the query 050 : Set : SVNat Lang Response : “Ledger Created” 060 : Set : SVNat Lang Request Processed : Yes Similarly, t h e Nat Lang Query Event can also be used to customize the interpretation of the queries being sent, and act accordingly. 3. ZIP-UNZIP ZIP is an archive file format that supports compression of data without any loss. A Zipped file may contain one or more files or folders in compressed form. The ZI P file format permits a number of compression algorithms. Originally created in 1989 by Phil Katz, the ZIP format is now supported by a number of software utilities. The need for supporting this format in T ally. ERP 9 has been fel t in various offline Integration projects. Data Exchange takes place between branches and their Head Offices, Distributors and the Principal Companies, etc., where the Head Offices/ Principa l Companies having T ally or anyWe have used Space as a delimiter for T okenizing Query Strings in the given example. One can specify any delimiter like Inverted quotes, comma, etc., toseparate different strings. If customized with the help of T okens, the Query Signature must be retained exactly in the same order and with the delimiters specified. In the givenexample, if the Query ' Create Ledger Keshav under Sundry Debtors ' is specified, the code will fail, as the function expects the 4th Word to be a Group Name. Hence, the Programmers must communicate the Query Signa-ture clearly with the end users. | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 36 1 other ERP would require the data from Branches/ Distributors fo r performance visibility. Usually, Principal Companies require the Item-wise Sales Information of the distributors, which helps them in planning their Stocks. For integration purpose, Head Offices/ Principal Companies generally get T ally. ERP 9 in stalled at Branches/ Distributors' locations. The day-to-day Transactions like Sales, Purchase Orders, etc., are then exported from T ally. ERP 9 and integrated by copying th e appropriate XML files to FTP, which is consumed by the Head Offices/ Principal Companies. At locations where the volume of transactions is large, the XML File becomes too bulky to upload to FTP, and subsequently, downloading from FTP takes a long time, thereby causing perfor mance issues. Hence, zipping the file before uploading to FTP was nec essary. This would save time both while uploading the File and while downloading it at the other end. Hence, the concept of Compression, i. e., Zip-Unzip has been introduced in T ally. ERP 9. Along with the actions for Zip/Unzip capability, wildcards * and ? are also supported, as a part of folder/file specification. Asterisk(*) represents zero or more characters in a string of characters. For example, t*. doc considers all files starting with 't', bearing the extension. d oc, e. g., T ally. doc, T allyzip. doc, etc. Question Mark (?) represents any one charact er. For example, TDLDebug?. * considers all the files starting with 'TDLDebug', followed by a ny variable single character, a n d bearing any extension, e. g., TDLDebug1. xlsx, TDLDebug2. xlsx, TDLDebug1. log, etc. 3. 1 ZIP Action Zip action can be used to archive a set of folders/ files. System Action-ZIP System action Zip is useful when a single File or Folder Source needs to be zippe d into a T arget file. Syntax Zip : <Target File> : <Source Path> [:<Password> [:<Overwrite> [:<Include Sub-directory> [:<Show Progress Bar>]]]] Where, <T arget File> is the name of the Zip File to be created, along with the Path. <Source Path> is the path of the Folder/File(s), which is to be zipped. It ca n be a folder, or a file path (with or without wildcard characters). <Password> is the password assigned to the T arget zipped file. <Overwrite> is the Logical Flag to specify the behaviour of the Action, if the T arget File already exists. If YES is specified, the file will be overwritten. If 'NO' is specifie d, the file will not be overwritten, and will remain as it is. The default value is 'NO '. <Include Sub-directory> is the Logical Flag to specify whether to include sub directori es available in the specified source path or not. If the Source Pa th ends with a Folder, the entire Folder along with its Sub-Folde rs will be zipped, irrespective of this parameter. If the Source Path ends with a File Name Pattern, i. e., with wild cards, this para meter will be considered. If a 'YES' is specified, all the files/sub-folders matching the wild card pat tern will be included for Zipping. If 'NO' is specified, they will not be included. The default value is 'NO'. | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 362 <Show Progress bar> is the Logical Flag to specify if the Progress Bar needs to be shown during the Zipping Process. If 'YES' is specified, the Progress Bar will be shown, and if 'NO' is specified, it will not be shown. If no value is specified, the default value will be assumed as 'NO'. Example: 1 ZIP : “. \Target. zip” : “tally. ini”: “Tally” : No With the above Action, the following will be achieved: 1. The file tally. ini from the current T ally Application/Working Folder will be zippe d to the File T arget. zip in the T ally Application Folder itself. 2. The resultant Zip File will contain the password Ta l l y. 3. If the file Tar g e t. z i p exists in the current application folder, it will not be overridden. Example: 2 T o Zip all text files in work folder. ZIP: “D:\Target. zip”: “D:\Work\*. txt”: “Tally”: No: Yes: Yes With the above Action, the following will be achieved: 1. All the text files from the folder D:\Work will be zipped to the File T arget. zip in D:\. 2. The resultant Zip File will contain the password Ta l l y. 3. If the file T arget. zip exists in D:\, it will not be overridden as the 4th Parameter is set to No. 4. All the text files within the Sub-directories will be include d under the Folder D:\Work, as the 5th Parameter is set to Yes. 5. The Progress Bar will be shown during Zipping of the Files, a s the 6th Parameter is set to Yes. Procedural Actions-Start Zip, Zip Add Path, Zip Exclude Path and End Zip Procedural Actions Start Zip, Zip Add Path, Zip Exclude Path and End Zip are very useful in cases where Multiple Folders/Files need to be zipped into / exc luded from a T arget File. Syntax Start Zip : <Target File> [: <Overwrite>] Zip Add Path : <Source Path> [: < Include sub-directory>] : : Zip Exclude Path : <Exclude Path> : : End Zip [: <Password> [: <Show Progress Bar>]] Where, <T arget File> indicates the name of the resultant Zip File, and also includes the Folder Path. Wild Cards * and ? are supported only for the last information in the path. For example, C:\Wor?\Cust*. txt is invalid whereas C:\Work\Cust*. txt is valid. | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 36 3 <Overwrite> is the Logical Flag to specify the behaviour of the Action, if the T arget File already exists. If YES is specified, the file will be overwritten. If 'NO' is specifie d, the file will not be overwritten, and will remain as it is. The default value is 'NO '. <Source Path> is the path of the Files or Folders, which are to be zipped. It can be a folder or a file path (with or without wildcard characters). <Include Sub-directory> is the Logical Flag to specify whether to include sub directori es available in the specified source path or not. If the Source Pa th ends with a Folder, the entire Folder along with its Sub-Folde rs will be zipped, irrespective of this parameter. If the Source Path ends with a File Name Pattern, i. e., with wild cards, this para meter will be considered. If a 'YES' is specified, all the files/sub-folders matching the wild card pat tern will be included for Zipping. If 'NO' is specified, they will not be included. The default value is 'NO'. <Exclude Path> is the path of the Files/ Folders which need to be excluded fro m the T arget Zip. <Password> is the password assigned to the T arget zipped file. <Show Progress Bar> is the Logical Flag used to specify if the Progress Bar needs t o be shown during the Zipping Process. If ' YES' is specified, then the Pro gress Bar will be shown, and if 'NO' is specified, it will not be shown. If no value is specified, the default value will be assumed as 'NO'. Example: 3 Start ZIP : “Target. zip” : Yes /* Overwrite the File Target. zip, if it exists */ Zip Add Path : “tally. ini” End Zip The outcome of this example will be similar to the outcome of E xample: 1. The only difference is that it is set to overwrite the target file T arget. Zip, if it exists in the current application folder (as the <Overwrite> Parameter of the Action 'Start Zip' is set to Yes). Example: 4 Start Zip : “Target. zip” : Yes Zip Add Path : “. \Tally. ini” Zip Add Path : “D:\Documents\*. doc” : Yes /* Include Sub-Folders also */ Zip Add Path : “C:\Work” /* The Folder Work and the Files within this folder will be included in the Zip File */ End Zip In this example, there are 3 Source Paths, which are required to be zipped: First Path indicates that the file Ta l l y. ini from the current application folder is to be zipped. The Second Path indicates that the PDF files from within the D:\Documents Folder, including the Sub-Folders, need to be zipped. The Third Path indicates that the entire folder C:\Work needs to be zipped. | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 364 The above source files would be zipped to the target file T arget. zip, which is specified in the Action Start Zip. Example: 5 Start Zip : “Target. zip” : Yes /* Overwrite the existing file in the target location */ Zip Add Path : “. \Tally. ini” Zip Add Path : “D:\Documents\*. doc” : Yes /* Include Sub-Folders also */ Zip Add Path : “C:\Work” Zip Exclude Path : “*. txt” End Zip In this example, apart from using Action Zip Add Path to specify the first 3 source paths, the subsequent Action Zip Exclude Path is used to specify the exclusion of Folders or Files with the extension. txt. Thus, all the text files from the above specified source paths will be excluded. 3. 2 UNZIP Action The Unzip action can be used to extract the original files from the zipped files. System Action-UNZIP System Action Unzip is useful when all the folders/ files in the Source Zip File ne ed to be completely unzipped, as they are. (This Action cannot be used i n case of partial Unzip. ) Syntax Unzip : <Target Folder>: <Source File> [: <Password> [: <Overwrite> [:<Show Progress Bar>]]] Where, <T arget Folder> is the path of the T arget folder where the Unzipped Files need to reside. <Source File> is the name of the Zip File to be unzipped. <Password> is the Zip File Password. A Zip File bearing a Password cannot be extracted without the Password. <Overwrite> is the Logical Flag to specify the behaviour if the Files being unzipped already exist in the T arget Folder. The default value is 'NO'. <Show Progress Bar> is the Logical Flag to specify if Progress Bar needs to be show n during the Extracting (Unzipping) Proc ess. If YES is specified, the Pr ogress Bar will be shown and if NO is specified, the Progress Bar wi ll not be shown. The default v alue is 'NO'. Example: 1 Unzip : “. ” : “D:\Target. zip” : “Tally” | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 36 5 In this example, the file D:\T arget. zip will be unzipped entirely in the current T ally Application Folder. Since the Zip File bears a password T ally, same is being passed as the 3rd Parameter. Example: 2 Unzip : “Documents” : “D:\Target. zip” : “Tally” In this example, all the folders/ files within the Zip File D:\T arget. zip will be extracted to the folder Documents in the current T ally Application folder. Procedural Actions-Start Unzip, Extract Path, Unzip Exclude Path and End Unzip The Procedural Actions Start Unzip, Extract Path, Unzip Exclude Path and End Unzip are very useful in case of partial Unzip. Using the Action 'Extract Path', one can specify the Folder/ F ile Path to be marked for extracting. The action 'Unzip Exclude Pat h' can help to exclude the specified Folders/ Files from the Zip File and extract the rest. These actions can be used in both the cases, i. e., for partial unzip as well as for total unzip. Syntax Start Unzip : <Source File> [: <Password >] Extract Path : <Folder/ File Path> : : Unzip Exclude Path : <Folder/ File Path> : : End Unzip : <Target folder> [:< Overwrite> [:<Show Progress Bar>]] Where, <Source File> is the path of the Zip File which needs to be zipped. <Password> is the password to access the T arget zipped file. <Extract Path> is the File/ Folder which need to be extracted from the Zip Fil e. <Unzip Exclude Path> is the path of Files/ Folders, which need to be excluded from t he unzipping operation. <T arget Folder> is the path of the T arget folder, where the Unzipped Files need to reside. <Overwrite> is the Logical Flag to specify the behaviour if the Files being unzipped already exist in the T arget Folder. The default value is 'NO'. <Show Progress Bar> is the Logical Flag to specify if Progress Bar needs to be show n during the Extracting (Unzipping) Proc ess. If YES is specified, the Pr ogress Bar will be shown and if NO is specified, the Progress Bar wi ll not be shown. The default v alue is 'NO'. Example: 3 Start Unzip : “D:\Target. zip” End Unzip : “D:\Unzipped” : Yes /* Overwrite the existing files, if any, in the T arget Folder */ | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 366 These actions will unzip all the folders/ files within D:\T arget. zip to the folder D:\Unzipped and if any file already exists, the same will be overwritten (as the s econd parameter of the Action End Unzip is set to Yes. ) Example: 4T o extract only. txt and. doc files from the zip file. Start Unzip : “D:\Target. zip” Extract Path : “*. txt” Extract Path : “*. doc” End Unzip : “. ” In this example, only the *. txt and *. doc files from D:\T arget. zip will be unzipped to the current T ally Application Folder. Example: 5 Start Unzip : “D:\Target. zip” Extract Path : “Samples\Supporting Files\” Unzip Exclude Path : “*. xls” End Unzip : “. ” In this example, from D:\T arget. zip, all the Files and Sub Folders within the folder 'Supporting Files' under 'Samples' will be unzipped to the current T ally Ap plication Folder, as the target folder is specified as a dot (. ). Also, all the files with extension. xls will not be zipped. Limitations of Zip/Unzip in T ally. ERP 9: In the following cases, Zip/Unzip action will fail: If the number of files being Zipped is greater than 65535 If the Size of the Zip File is greater than or equal to 4 GB If the Size of any File within the Zip File is greater than or equal to 4 GB 4. Columnar Capability in Edit Mode Multiple-Column feature in T ally. ERP 9 has till date been used by the T ally users for various reporting needs like Comparative Analysis of Data across Multip le Periods (Months, Quarters, Y ears, etc. ), Multiple Companies, Multiple Godowns, etc. It can also be used for comparative study of various parameters like Budget vs. Actual Performance, by getting the same displayed in the form of a column-based report. A file which has been zipped from T ally. ERP 9 can be extracted by using any standard third party archiving tools like Winzip, Winrar, etc., and vice-versa. | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 36 7 It was felt highly desirable if, apart from these reporting fun ctionalities, various data entry operations could also be performed in a Columnar or T abular man ner. This would not only facilitate data entry in a simple, user friendly manner, but also considerably reduce the time taken to enter the data. For instance, Attendance of Employees could be accepted a gainst the Attendance Types or days, in a T abular format. Similarly, other examples could be Employee-wise Pay Head-wise Salary Structure, Stock Item-wise Price Level-wise Price List, etc., where this capability could be used effectively. In order to make this possible in T ally, the Columnar capability was required to be extended to support Edit mode. From Release 4. 7 onwards, suppor t for Multi Columns has been ex tended to Edit Mode too, to enable the developer to design and implement such functionaliti es in T ally, as per requirement. T o make this possible in TDL, the Horizontal Scrolling behaviou r has been enhanced to work in Edit Mode, which will enable the developer to create a user friendly interface, thereby allowing the user to enter data conveniently in tabular format. T o achie ve the columnar scr olling behaviour; in TDL, fields within the required line can be repeated over ei ther of the following: Collection of Objects, OR Sub-Collections under a Primary Object, provided the Sub-Collections contain Object(s) In the absence of the above ' Repeat ' specification, the only criterion to repeat the Fields/ Columns is that the number of Fields to be repeated must be kno wn to the Line. 5. New data types Introduced Introduction A Data T ype in a programming language is a classification, identifying one of the various types of data supported by that language, each having certain pre-defined characteristics. It determines the possible values for that type; the operations that can be d one on values of that type; and the way values of that type can be stored. They are an integral par t of every programming language and hence, almost all programming languages support a set of pr imitive data types. TDL, being a domain-specific language, supports various domain-specific data types like Quantity, Rate, Amount, Rate of Exchange, etc., apart from the basic dat a types like String, Number, Date and Logical. In Release 4. 7, a few Date and Time related data types have been introduced to support various business requirements. All the data types pertaining to date an d time are now collectively referred to as Calendar data types, which are as follows: DATE TIME DATETIME DURATIONWith respect to Object context, Horizontal Scroll will only happen if Objects/Sub Objects, on which Columns are to be repeated, exist. In other words, in Create Mode with Object Context, Horizont al Scroll will not work as the number of fields to be repeated is not known. | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 368 DUE DATE However, two data types, viz., Date and Due Date were already supported in TDL. The data types Time, Date Time, and Duration are the ones which have been introduced in Release 4. 7. With the introduction of these data types, now various business functionalities like capturing Date and Time of entering a voucher, calculating the weekly average clock-in time of employees, etc., will be possible in T aly. ERP9. Calendar Data T ypes As already discussed, Calendar Data Types comprise of the data types Date, Time, Date Time, Duration and Due Date, of which, 'Time', 'Date Time' and 'Duration' have been introduc ed in Release 4. 7. Apart from the new data types, a few supporting Functions, Form ats, Input Keywords and Qualifiers have also been introduced for each. Formats can be specified to indicate the format in which the value has to be displayed. The concept of Input Keywords and Qualifiers has been introduced to assist the T ally user in data entry operations, a s well as to minimize the effort of the programmer in setting the values of any particular calendar dat a type within a Field. For example, in a Field of data type 'Date', specifying the Input keyword ' Week ' as the value, will lead to setting of the current week's beginning date as the value. Also, Qualifier s like ' This ', 'Next ', etc., if specified along with the Input Keywords, will lead to storing and display ing of values determined by the 'Input Keyword-Qualifier' combination. For example, specifying 'Next Week ' will return the beginning date of the following week as the value. All of these have been discussed in detail in the following sections. 5. 1 DATE Specifying the data type as Date indicates that the data container can only hold Date values. Th e data container can be a UDF, a Variable or a Field. The date values can range from January 1, 1901 to December 31, 2098. The default separator character within a Date is 'Hyphen', e. g., 22-12-2 011. Example: [System : UDF] Date Of Purchase : Date : 11 07 /* A new System UDF Dateof Purchase of Type Date is declared. */ [Field : Date of Purchase] Type : Date Storage : Date Of Purchase /* A Field Dateof Purchase of Type Date is defined for updating values in the UDF Date Of Purchase */ Format Keywords Apart from specifying the Type as Date, one of the various available Formats can also be specified, using the attribute ' Format '. | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 36 9 The various Formatting Keywords for the data type 'Date' are li sted in the following table. If no Format is specified, the default format 'Universal Date' is ass umed. Table 1. Date Formats for Data Type Date Example: [Field : Date of Purchase] Type : Date Storage : Date Of Purchase Format : “Short Date” /* The Format specified within the Field Dateof Purchase is Short Date, and hence, the date is returned in dd-mm-yyyy format. */ Input Keywords There are certain Input keywords, which can be specified instea d of the date itself. This increases the ease of data entry. The Input Keywords available for the data type Date are as follows: Table 2. Input Keywords for Data Type Date Format Field Value Specified Value Returned Short Date 22-Dec-2011 22-12-2011 Long Date 22-Dec-2011 Thursday, 22 Dec, 2011 Universal Date (default format) 22-Dec-2011 22-Dec-2011 Month Beginning 1-Dec-2011 22-Dec-2011 Dec-2011 22-Dec-2011 Month Ending 31-Dec-2011 22-Dec-2011 Dec-2011 22-Dec-2011 Input Keyword Alias Value Returned Today Today, Day, Now Current system date Tomorrow Tomorow, Tommorrow Next day's date Yesterday YDay Previous day's date Week Current week's beginning date Month Mth Current month's beginning date Year Yr First date, i. e., 1-Jan, of the current year | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 370 Example: [Field : Date of Purchase] Type : Date Storage : Date Of Purchase Format : “Short Date” Set As : Today /* The input keyword Today sets today's date as the value within the Field Date of Purchase. */ Date Qualifiers There are also some date qualifiers, which can be used in combi nation with input keywords, to return the required date value. Qualifiers cannot be used indep endently, but they can be provided as additional specification for the input keyword. The various date qualifiers are as follows: Figure 3. Date Qualifiers [Field : Date of Purchase] Type : Date Storage : Date Of Purchase Format : “Short Date” Set As : Last Financial Year /* In Last Financial Year, 'Last' and ' Financial ' are qualifiers, while ' Year ' is an Input Keyword. It sets the field value as the 1st day of the last/previous financial year. */ Date Qualifier Usage (along with Input Keywords) Financial Financial Year, This Financial Year, Prev Financial Y ear, Next Financial Year, Last Financial Year This This Week, This Month, This Year, This Financial Year Prev/Last Prev Week, Prev Month, Prev Year, Prev Financial Year, Last Week, Last Month, Last Year, Last Financial Year Next Next Week, Next Month, Nex t Year, Next Financial Year Week is assumed to begin on Sunday. For example, on 20th August, 2013, the value of the Field set as 'Prev Week' is returned as 1 1th August, 2013, which is the Sunday of the week prior to the current week. | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 37 1 Functions V arious Type casting and Manipulation Functions have also been provided, corresponding to the Data Type Date. They are as follows: Function-$$Date The function $$Date is used to convert a valid date value from any other data type to the data type Date. This is mainly required when manipulations on the date ne ed to be performed. Syntax $$Date : <Expression> Where, <Expression> can be any expression, which evaluates to a valid date value. Function-$$Month Of Date The function $$Monthof Date returns the month corresponding to t he date specified as the parameter. Syntax $$Month Of Date : <Date Expression> Where, <Date Expression> can be any expression, which evaluates to a valid date value. The result returned will be of Type 'Number'. For example, if t he specified date is 05-04-2013, then the function returns the value 4, as the date belongs to the 4th month of the year. Function-$$Day Of Week The function $$Day Of Week returns the weekday corresponding to t he date specified as the parameter. Syntax $$Day Of Week : <Date Expression> Where, <Date Expression> can be any expression, which eva luates to a valid date value. For example, if the specified date is 05-04-2013, then the result would be Friday. Function-$$Day Of Date This function returns a number to represent the day, corresponding to the date specified as the parameter. For example, Sunday will be represented by the number 1, Monda y by 2, and so on. Syntax $$Day Of Date : <Date Expression> Where, <Date Expression> can be any expression, which evaluates to a valid date value. For example, if the specified date is 05-04-2013, then the result would be 5, as the corresponding day is Friday, which is the 5th day of the week. | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 372 Function-$$Year Of Date The function $$Y earof Date returns a number representing the ye ar of the date specified as the parameter. Syntax $$Year Of Date : <Date Expression> Where, <Date Expression> can be any expression, which evaluates to a valid date value. The result returned by the function will be of Type 'Number'. F or example, if the specified date is 05-04-2013, then the result would be 2013. Function-$$Short Month Name The function $$Short Month Name returns the short form of the nam e of the month, corresponding to the date specified as the parameter, e. g., Jan, Feb, etc. Syntax $$Short Month Name : <Date Expression> Where, <Date Expression> can be any expression, which evaluates to a valid date value. For example, if the date value is 05-04-2013, then the value returned by the function will be Apr. Function-$$Full Month Name The function $$Full Month Name returns the full name of the month, corresponding to the date specified as the parameter, e. g., January, February, etc. Syntax $$Full Month Nam : <Date Expression> Where, <Date Expression> can be any expression, which eva luates to a valid date value. For example, if the specified date is 05-04-2013, then the result would be April. Function-$$Week End This function returns the date of the first Sunday following th e date specified as the parameter. However, if the argument date, i. e., the date specified, itself corresponds to the day Sunday, then the date corresponding to the following Sunday will be returned. Syntax $$Week End : <Date Expression> Where, <Date Expression> can be any expression, which evaluates to a valid date value. For example, if the specified date is 05-04-2 013, then the result would be 07-Apr-2013, being the following Sunday. If the date specified is itself 07-04-2 013, then the date returned will be 14-Apr- 2013, i. e., the date of the following Sunday. | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 37 3 Function-$$Month End It returns the date of the last day of the month, corresponding to the date specified as parameter. Syntax $$Month End : <Date Expression> Where, <Date Expression> can be any expression, which evaluates to a valid date value. For example, if the specified date is 05-04-2013, then the result would be 30-Apr-2013. Function-$$Year End This function returns the last date of the year, considered to be starting from the date specified as the parameter. Syntax $$Year End : <Date Expression> Where, <Date Expression> can be any expression, which evaluates to a valid date value. For example, if the specified date is 05-04-2013, then the result would be 4-Apr-2014, which is one year from the date specified, i. e., the last day of the year, if the specified date is considered as the current date. Function-$$Month Start The function $$Month Start returns the date of the first day of the month, corresponding to the date specified as the parameter. Syntax $$Month Start : <Date Expression> Where, <Date Expression> can be any expression, which evaluates to a valid date value. For example, if the specified date is 05-04-2013, then the result would be 1-Apr-2013. Function-$$Fin Year Beg This function is used to fetch the starting date of the company 's financial year, corresponding to a particular specified date. Two parameters are required for this function. The 1st parameter is the Date value for which the corresponding Financial Y ear's Beginni ng date is to be identified. The 2nd parameter is the "Financial Y ear From" date of the company, i. e., the time from which the financial year of the company normally starts. Specification of this parameter is essential as the Financial year is determined by the law of the country, and can be Apr-Mar, Jan-Dec, etc. Syntax $$Fin Year Beg : <First Date Expression> : <Second Date Expression> Where, <First Date Expression> evaluates to the Date, for which the corresponding Financial Y e ar's Beginning date is to be identified. | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 374 <Second Date Expression> is used to specify the normal financial year beginning date (irrespective of the year). For example, if the first parameter is 05-04-2013 and the second parameter date is 1-4-2010, then the result would be 1-Apr-2013. Function-$$Fin Year End This function is used to fetch the end/last date of the company 's financial year, corresponding to a particular specified date. Two parameters are required for this function. The 1st parameter is the Date value for which the corresponding Financial Y ear's Ending date is to be identified. The 2nd parameter is the “Financial Y ear From” date of the company, i. e., the time from which the financial year of the company normally starts. Specification of this parameter is essential as the Financial year is determined by the law of the country, and can be Apr-Mar, Jan-Dec, etc. Syntax $$Fin Year End : <First Date Expression> : <Second Date Expression> Where, <First Date Expression> evaluates to the Date, for which the corresponding Financial Y e ar's Ending date is to be identified. <Second Date Expression> is used to specify the normal financial year beginning date (irrespective of the year). For example, if the first parameter is 05-04-2013 and the second parameter date is 1-4-2010, then the result would be 31-Mar-2014. Function-$$Prev Year The function $$Prev Y ear returns the previous year's date, respe ctive to the date specified as the parameter, i. e., the date exactly a year ago. Syntax $$Prev Year : <Date Expression> Where, <Date Expression> can be any expression, which evaluates to a valid date value. For example, if the specified date is 05-04-2013, then the result would be 5-Apr-2012. Function-$$Next Year The function $$Next Y ear returns the next year's date, correspon ding to the date specified as the parameter, i. e., the date exactly a year from now. Syntax $$Next Year : <Date Expression> Where, <Date Expression> can be any expression, which evaluates to a valid date value. For example, if the specified date is 05-04-2013, then the result would be 5-Apr-2014. | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 37 5 Function-$$Prev Month The function $$Prev Month returns the previous month's date, cor responding to the date specified as the parameter, i. e., the date exactly a month ago. Syntax $$Prev Month : <Date Expression> Where, <Date Expression> can be any expression, which evaluates to a valid date value. For example, if the specified date is 05-04-2013, then the result would be 5-Mar-2013. Function-$$Next Month The function $$Next Month returns the next month's date, corresp onding to the date specified as the parameter, i. e., the date exactly a month from now. Syntax $$Next Month : <Date Expression> Where, <Date Expression> can be any expression, which evaluates to a valid date value. For example, if the specified date is 05-04-2013, then the result would be 5-May-2013. 5. 2 TIME A new Data Type TIME has been introduced, which represents an absolute time of the day. Specifying the Data Type as 'Time' indicates that the data cont ainer can hold only the Time values. The data container can be a UDF, a V ariable or a Field. A value of this data type describes the time, with milliseconds precision, i. e., using the sub-parts HOURS, MINUTES, SECONDS, and MILLI- SECONDS. Thus, the format is hh:mm:ss:MMM By default, Colon is the separator between the sub-parts of the time value, which can also be altered by the user. For example, 16:35:12:348 Example: [System : UDF] Time Of Purchase : Time : 11 08 /* A new System UDF Timeof Purchase of Type Time is declared. */ [Field : Time of Purchase] Type : Time Storage : Time Of Purchase /* A Field Time of Purchase of Type Time is defined for updating values in the UDF Time Of Purchase */ | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 376 Format Keywords Just as in the case of 'Date' data type, various Formatting Key words have also been introduced for the 'Time' data type, to render the Time in various formats. The formats are listed in the following table. Figure 4. Format Ke ywords for Data Type Time Input Keywords The input Keywords available for the data type Time are as shown in the following table: Figure 5. Input Key words for Data Type Time Format Alias Value of Field Value Returned 12 hour (Default Format) 12 hr 16:35:12:348 4:35 PM 24 hour 24 hr 16:35:12:348 16:35 With Seconds With Sec, With Secs16:35:12:348 4:35:12 PM (12 hr format) 16:35:12 (24 hr format) With Milli Seconds With Milli Secs, With Milli Sec16:35:12:348 4:35:12:348 PM (12 hr format) 16:35:12:348 (24 hr format) Prefix AMPM AMPM Prefix 16:35:12:348 PM 4:35:12:348 (12 hr form at, with millisec) By default, the AM/PM designator is suffixed to the time value. Specifying the format 'Prefix AMPM' makes the AM/PM designator get appended as prefix, instead of suffix. No Zero 0:00 If this format is specified, the time won't be displayed, if the time value in the field is 0:00 Separator: '<Symbol>' 16:35:12:348 This format specifier is used to change the time separator. For example, Format : “Separator: '/'” will return the value as 4/35 PM, instead of 4:35 PM Input Keyword Value Returned Now Current system time value Midnight Midnight time value, i. e., 0:00 Noon Noon time value, i. e., 12:00 | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 37 7 Functions Function-$$Time The Function $$Time is used to convert a valid time value from any other data type to the Data Type Time. It is mainly require d when manipulations on the time need to be performed. Syntax $$Time:<Expression> Where, <Expression> can be any expression, which evaluates to a valid Time value. 5. 3 DATETIME A new Data Type Date Time has also been introduced. Specifying the Data Type as Date Time indicates that the data container can hold only the values of t ype 'Date Time'. The data container can be a UDF, a V ariable or a Field. A value of data type 'Date Time' represe nts a date, along with the absolute time of the day. The date and the time are described using the sub-parts DA Y, MONTH, YEAR, HOUR, MINUTE, SECOND, and MILLISECONDS. Thus, the format is dd-mm-yy hh:mm:ss:MMM By default, the separator for the 'Date' part is Hyphen (-) and for the 'T ime' part is Colon (:). However, the same can be altered by the user. The date-time combination values can range from January 1,19 01 00: 00:00: 000 to December 31, 2098 23:59:59:999 Example: [System : UDF] Date Time Of Purchase : Date Time : 11 09 /* A new System UDF Date Timeof Purchase of Type Date Time is declared. */ [Field : Date and Time of Purchase] Type : Date Time Storage : Date Time Of Purchase /* A Field Dateand Timeof Purchase of Type Date Time is defined for updating values in the UDF Date Time Of Purchase */ Input Formats Date Only This Format is specified to accept both Date and Time values in the Field, but display only Date. In other words, if this Format is specified within a field of t ype Date Time, then the field can accept both Date and Time values, but will display only Date. For example, consider a Field of Type Date Time, where the Format is specified as 'Date Only'. If the Input keyword 'T oday' is entered in this Field, then instea d of displaying the current date and time, the field will display only the current date. Example: [Field : Date of Purchase] | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 378 Type : Date Time Storage : Date Time Of Purchase Format : “Long Date, Date Only” /* Both Date and Time values will be accepted as input in the Field Dateof Purchase, but only the Date value will be displayed. */ Time Only This Format is specified to accept both Date and Time values in the Field, but display only Time. In other words, if this Format is specified within a field of t ype Date Time, then the field can accept both Date and Time values, but will display only Time. For example, consider a Field of type Date Time, where the Format is specifi ed as 'Time Only'. If the Input keyword 'Now' is entered in this Field, then instead of displaying the current date and time, the field will display only the current time. Example: [Field : Time of Purchase] Type : Date Time Storage : Date Time Of Purchase Format : “12 hour, Time Only” /* Both Date and Time values will be accepted as input in the Field Timeof Purchase, but only the Time value will be displayed. */ Input Keywords Input Keywords available for the date type Date Time are as shown in the following table: Input Keyword Alias Value Returned T oday Day, Now Current system date & time. T omorrow T omorow, To m o r r o w Next day's date & time, i. e., the date and time exactly a day later. Y esterday YDay Previous day's date & time, i. e., the date & time exactly a day before. Week The 'Date' part is set as the Current week's beginning date. | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 37 9 Figure 6. Input Key words for Data Type Date Time Date Qualifiers All the qualifiers for the data type Date are applicable for the data type Date Time as well. Functions Function-$$Date Time The Function $$Date Time is used to convert a valid Date and/or Time (Date Time) value from any other data type to the data type 'Date Time'. This is mainly req uired when manipulations on Date Time values need to be performed. Syntax $$Date Time : <Date Time Expression> Where, <Date Time Expression> can be any expression, which evaluates to a valid Date and/or T ime (Date Time) value. Function-$$Add Hours The function $$Add Hours is used to add a certain specified numb er of hours to a value of data type Date Time. Syntax $$Add Hours : <Date Time Expression> : <Value> Where, <Date Time Expression> can be any expression, which evaluates to a valid Date and/or T ime (Date Time) value. <Value> is the number of hours to be added to the Date Time value. For example, if the specified Date Time is 05-04-2013 5:20 PM and the <V alue> to be added is 4, then the value returned by the function would be 5-Apr-2013 9:20 PM. Function-$$Sub Hours It is used to subtract a certain specified number of hours from a value of data type Date Time. Syntax $$Sub Hours : <Date Time Expression> : <Value>Month Mth The 'Date' part is set as the Current month's beginning date. Year Yr The 'Date' part is set as the Current year's beginning date. For the keywords 'T omorrow', 'Yesterday ', 'Month', 'Week' and 'Year', the time already available in the Field, i. e., the 'Tim e' Part of the Date Time value, is set as the time. If the 'Time' valu e is not available, then it will be set to 0:00. | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 380 Where, <Date Time Expression> can be any expression, which evaluates to a valid Date and/or T ime (Date Time) value. <Value> is the number of hours to be subtracted from the Date Time value. For example, if the specified Date Time is 05-04-2013 5:20 PM and the <V alue> to be subtracted is 4, then the result would be 5-Apr-2013 1:20 PM. Function-$$Add Minutes The function $$Add Minutes is used to add a certain specified nu mber of minutes to a value of data type Date Time. Syntax $$Add Minutes : <Date Time Expression> : <Value> Where, <Date Time Expression> can be any expression, which evaluates to a valid Date and/or T ime (Date Time) value. <Value> is the number of minutes to be added to the Date Time value. For example, if the specified Date Time is 05-04-2013 5:20 PM and the value to be added is 20, then the result would be 5-Apr-2013 5:40 PM. Function-$$Sub Minutes The function $$Sub Minutes is used to subtract a certain specifi ed number of minutes from a value of data type Date Time. Syntax $$Sub Minutes : <Date Time Expression> : <Value> Where, <Date Time Expression> can be any expression, which evaluates to a valid Date and/or T ime (Date Time) value. <Value> is the number of minutes to be subtracted from the Date Time val ue. For example, if the specified Date Time is 05-04-2013 5:20 PM and the <V alue> to be subtracted is 20, then the result would be 5-Apr-2013 5:00 PM. Function-$$Add Seconds The function $$Add Seconds is used to add a certain specified nu mber of seconds to a value of data type Date Time. Syntax $$Add Seconds : <Date Time Expression> : <Value> Where, <Date Time Expression> can be any expression, which evaluates to a valid Date and/or T ime (Date Time) value. <Value> is the number of seconds to be added. | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 38 1 For example, if the specified Date Time value is 05-04-2013 5:20:15 PM and the <V alue> to be added is 15, then the result would be 5-Apr-2013 5:20:30 PM. Function-$$Sub Seconds The function $$Sub Seconds is used to subtract a certain specifi ed number of seconds from a value of data type Date Time. Syntax $$Sub Seconds : <Date Time Expression> : <Value> Where, <Date Time Expression> can be any expression, which evaluates to a valid Date and/or T ime (Date Time) value. <Value> is the number of seconds to be subtracted from the Date Time val ue. For example, if the specified Date Time value is 05-04-2013 5:20:15 PM and the <V alue> to be subtracted is 15, then the result would be 5-Apr-2013 5:20:00 PM. Sub T ypes introduced for the Data T ype 'Date Time' Two subtypes have also been introduced for the data type 'Date T ime': Date This Sub Type is specified to accept both Date and Time values i n the Field, but display only Date. In other words, if this Sub Type is specified within a field of type Date Time, then the field can accept both Date and Time values, but will display only Date. For example, consider a Field of type Date Time, where the sub-t ype is specified as 'Date'. If the Input keyword 'T oday' is entered in this Field, then instead of displaying the current date and time, the field will display only the current date. Example: [Field : Date and Time of Purchase Date] Type : Date Time : Date Storage : Date Time Of Purchase Time This Sub Type is specified to accept both Date and Time values i n the Field, but display only Time. In other words, if this Sub Type is specified within a field of type Date Time, then the field can accept both Date and Time values, but will display only Time. For example, consider a Field of type Date Time, where the sub-type is speci fied as 'Time'. If the Input keyword 'Now' is entered in this Field, then instead of d isplaying the current date and time, the field will display only the current time. Example: [Field : Date and Time of Purchase Time] Type : Date Time : Time | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 382 Storage : Date Time Of Purchase Here, both Date and Time will be accepted but only the 'Time' p art of the Date Time value is displayed in the field. Manipulation can be done on date as wel l as time. 5. 4 DURATION V alues of this data type will represent the interval between tw o Date and/or Time values (two Date Time values), measured in years, months, weeks, days, hours, minutes, and seconds. Example: [System : UDF] Tenure Of Service : Duration : 1110 [Field : Tenure Of Service] Type : Duration Storage : Tenure Of Service /* A Field Tenure Of Service of T ype Duration is defined for updating values in the UDF Tenure Of Service */ Formats The format options available for the Duration data type are: Figure 7. Format Op tions for Data Type Duration T wo fields with subtypes as Date and Time can have the same storage and the changes from one field will be reflected in the other field. Format Alias Value of Field Value Returned Days (Default) Day, Dys 25 25 Days Years Year, Yr, Yrs 25 25 Years Months Month 25 25 Months Weeks Week, Weak, Wks 25 25 Weeks Hours Hour, Hr, Hrs 25 25 Hours Minutes Mins, Minute, Min 25 25 Minutes Seconds Secs, Second, Sec 25 25 Seconds YMD (Years, months and days)416 1 Year, 1 Month and 20 Days HMS (Hours, minutes and seconds)5000 1 Hour, 23 Minutes and 20 Seconds | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 38 3 Example: [Field : Tenure Of Service] Type : Duration Storage : Tenure Of Service Format : “Months, Days” Points to Remember: 1. Any combination of the formats can be provided. However, Week is an independent format and cannot be clubbed with any other format. Let's see the followin g illustrations: In the above example, if the value entered by the user in the F ield is 100, then the lowest (in terms of duration) of the formats specified will be conside red as the input format, i. e., 100 will be considered as 100 days and then, the same will be displayed as output in terms of months and days, i. e., 3 months and 10 days. If the Format is specified as ' Weeks, Days ', then the value returned will be in Days, as 'Weeks' is an independent entity and cannot be clubbed with any other format. 2. If the value entered is less than the lowest value (in terms of duration) among the formats specified, then the value returned will be zero. For example, If 6 days is entered and the format is weeks, then the value returned wil l be 0 weeks. If 8 days is entered and the format is weeks, then 1 week will be displayed. Functions Function-$$Duration The Function $$Duration is used to convert a valid duration val ue from any other data type to the data type Duration. This is mainly required when manipulations on values of type Date, Time or Date Time need to be performed. Syntax $$Duration : <Expression> Where, <Expression> can be any expression evaluating to a valid duration value like 10 days, 5 hrs, etc. Function-$$Get End Date Time If the initial/starting Date Time value and the Duration value a re provided, then the Function $$Get End Date Time will return the final/ending Date Time value. Syntax $$Get End Date Time : <Date Time Expression> : <Value>A value of T ype 'Date', when subtracted from another value of T ype 'Date', will result in a value of T ype 'Number', and not 'Duration'. If the resultant value is needed to be of T ype 'Duration', the function $$Duration has to be used. | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 384 Where, <Date Time Expression> can be any expression, evaluating to a valid Date/Date Time valu e. <Value> is used to specify the Duration value. For example, if the specified Datetime value is 05-04-2013 12:12 AM and the Duration value is set as 10 days, then the result would be 15-Apr-2013 0:12 AM (12:12 AM same as 0:12 AM) Function-$$Get Start Date Time If the final/ending Date Time value and the Duration value are p rovided, the Function $$Get Start Date Time will return the initial/starting Date Time va lue. Syntax $$Get Start Date Time : <Date Time Expression> : <Value> Where, <Date Time Expression> can be any expression, evaluating to a valid Date/Date Time valu e. <Value> is used to specify the Duration value. For example, if the specified Date Time value is 05-04-2013 12:12 AM and the Duration value is 11 hours 30 minutes, then the result would be 4-Apr-2013 12:42 PM. Function-$$Get Duration If two Date Time values, representing the Initial/Starting and F inal/Ending Date Time values, are provided, then the function $$Get Duration will return the durat ion between them. Syntax $$Get Duration : <First Date Time Expression> : <Second Date Time Expression> Where, <First Date Time Expression> can be any expression, which evaluates to a valid Date/Date Time value. <Second Date Time Expression> can be any expression, which evaluates to a valid Date/ Date Time value. For example, if the first parameter is 05-04-2013 12:12 AM and the second parameter is 15-Apr-2013 0:12 AM, then the value returned would be 10 Days. (12:12 AM is the same as 0:12 AM). Function-$$Add Duration The function $$Add Duration adds a duration value to another dur ation value. Two duration values are provided as parameters. If a particular parameter contains only a number and no unit is specified, it is assumed to be that many number of days. Syntax $$Add Duration : <First Duration Expression> : <Second Duration Expression> Where, <First Duration Expression> can be any expression, which evaluates to a valid Duration valu e or a Number. | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 38 5 <Second Duration Expression> can be any expression, which evaluates to a valid Duration value or a Number. If the first Duration parameter is set to 10 Days and the second Duration parameter is set to 4 Months, then the result would be 130 Days. Function-$$Sub Duration This function subtracts the specified duration or from another duration value. Two duration values are provided as parameters. If a particular parameter contains only a number and no unit is specified, it is assumed to be that many number of days. Syntax $$Sub Duration : <First Duration Expression> : <Second Duration Expression> Where, <First Duration Expression> can be any expression, which evaluates to a valid Duration valu e or a Number. It is the value to be subtracted, and should be less than or e qual to the other value. <Second Duration Expression> can be any expression, which evaluates to a valid Duration value or a Number. If the first parameter Duration is set to 10 Days and the second Parameter Duration is set to 4 Months, then the result would be 110 Days. 5. 5 DUE DATE The values of Data Type Due Date are used to represent the Due Date in cases like Purchase Order, Bill Credit Period, etc., in T ally. ERP 9. These values a ctually comprise of two date values, i. e., the 'From' Date and the last date by which honouring of the co mmitment is due (i. e., the 'due date'). A flexible range of values can be specified. The value can be a Date (the 'due date') or the Duration, in terms of Days, Weeks, Months and Y ears, from the s tarting date ('From' date). The acceptable duration values used to specify the due date range f rom 0 to 89 years. Input Formats Four input formats can be specified for values of data type Due Date. If no input format is specified, then the default format Days is considered. Figure 8. Input Formats for data type Due Date Format Value Returned Days (Default) Due Date in Days Weeks Due Date in Weeks Months Due Date in Months Years Due Date in Years As the default format is 'Days', on en tering only the number 30, 30 days will be considered. The value is displayed in the same format in which it has been entered. | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 386 Functions Function-$$Date Range This function is used to convert a valid Due Date value from an y other data type to the data type Due Date. It is used to set the values to a method of Type 'Due Date' pr ogrammatically. F o r example, while creating a Purchase Order Voucher programmatical ly using User Defined Functions, to set the value to method Order Due Date (of type Due Date), we need to use this Function. Syntax $$Date Range : <Value> : <Date Expression> : <Logical Expression> Where, <Value> must evaluate to a Date OR the duration in terms of Days, Weeks, Months and Y ears. <Date Expression> must evaluate to a Date, which is considered as the 'From' Date. <Logical Expression> must evaluate to a logical value. This logical value denotes wh ether the specified 'From' date is also to be included, while calculating the due date. For example, if the first parameter is set to 2 M, the second Parameter to 05-04-2013, and the third Parameter to YES, then the method, say 'Order Due Date', will be set as 04-06-2013, i. e., 2 Months from the specified 'From' date, including the 'From' dat e. However, if the logical expression is NO, then the value stored in the method would be 05-06-2013. Function-$$Due Date By Date This function returns the due date value in 'Date' format. The parameter passed to this function is a value of type Due Date. Syntax $$Due Date By Date : <Due Date Expression> Where, <Due Date Method> can be any expression, which evaluates to a value of Type Due D ate. In continuation to the previous example, if the method 'Order Du edate', evaluated with the Logical value set as YES, is provided as the parameter, the result would be 04-06-2013, i. e., the Due Date in 'Date' format. Function-$$Due Date In Days This function provides the due date value in 'number of days' f ormat. The parameter passed to this function is a value of type Due Date. The function returns the due date in terms of the total number of days, considered from the 'From' date. Syntax $$Due Date In Days : <Due Date Expression> Where, <Due Date Method> can be any expression, which evaluates to a value of Type Due D ate. | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 38 7 Function-$$Is Set By Date This function checks and indicates if the due date is mentioned i n t e r m s o f ' D a t e ', i n s t e a d o f 'Number of Days'. It returns a logical value, i. e., 'Y es' OR 'No'. If the due date's format is 'Date', then the function returns 'Y es', else it returns 'No'. Syntax $$Is Set By Date : <Date Expression> Where, <Date Expression> can be any value of Type Due Date. 5. 6 Compatibility of Data Type 'Date Time' with Data Types 'Dat e' and 'Time' 1. Setting a data container (Field, UDF or Method) of type Date OR Time with a value of data type Date Time is possible. For example, if the value of a field of type Date or Time is set by referring to another field of type Date Time, the p articular date value OR time value is t aken, respectively, and the same is displayed in the Field. Example: [Field : Date of Purchase] Type : Date Storage : Date Of Purchase Format : “Long Date” Set as : #Dateand Time Of Purchase Date and Time Of Purchase is a Field containing a value of type Date Time. When this field is being referred to in the Field Date of Purchase of type Date, the 'Date' part of the value is extracted and set as the value of the field. 2. Date and Time functions can be used on a value of type Date Time. The vice versa is also true, i. e., Date Time functions can also be used on a value of type Date or Time. Example: $$Day Of Week : $Date Time Of Purchase /* Date function is used on method value of type Date Time */ $$Day Of Date : #Dateand Time Of Purchase /* Date function is used on field value of type Date Time */ $$Time : #Dateand Time Of Purchase /* Time function is used on field value of type Date Time */ $$Date Time : #Date Of Purchase /* Date Time function is used on field value of type Date */ | TDL_Reference_Manual.pdf |
What's New in Release 4. 7 388 5. 7 Constraints and Assumpt ions for Calendar Data Types TIME 1. Data Type Time currently does not support time zones. 2. Data Type Date is independent of the Data Type Time. This means that if the time is changed from PM to AM, or vice versa, the Date does not change. 3. Time is cyclic in nature, i. e., if 12 hours are subtracted from 1 am, it resul ts in 1 pm. DA TETIME In a field of type Date Time, for entering the time value, date must be entered first. When a value of type Date is converted to type Date Time, then default value of time is taken as 0:00. When a value of type Time is converted to type Date Time, then the default value of Date is assumed as the current date. DURA TION In Duration data type, if no unit is specified, then it is by default taken as days. For example, in a Field of type 'Duration', if the value entered is 10, then it is considered as 10 days. Negative Duration is not supported. 5. 8 COM Support to Calendar Data T ypes We are already aware that the COM DLL Support feature had been introduced for TDL in Release 4. 6, to support COM DLL Processing. But, the support was restri cted to only a few data types. In the Release 4. 61, the support had been extended to many more da ta types. (For Further details on COM Capability, refer to 'What's New in Release 4. 6' and 'What's New in Releas e 4. 61' in this document. ) From Release 4. 7 onwards, the COM support has been extended for two other data types, viz., Time and Date Time. | TDL_Reference_Manual.pdf |
389 What's New in Release 4. 61 1. COM Data T ypes Support In Release 4. 6, a new Definition Type COM Interface, a new Action Exec COM Interface, and new Functions $$COMExecute and $$Is COMInterface Invokable had been introduced to extend Support for COM Servers. However, this support was limited to o nly a few COM Data Types. From Release 4. 61 onwards, the fo llowing COM Data Types will al so be supported: COM Data Type TDL Data Type Other Permissible TDL Data Types Range of Values/Other Details String String Number, Date, Logical, Amount Float Number String, Amount 3. 4 * 10^-38 to 3. 4 * 10^38 Double/Number Number String, Amount 1. 7 * 10^-308 to 1. 7 * 10^3 08 Currency/ Amount Amount String, Number This would have a precision of 4 decimal places, rather than 5, as in Tally. ERP 9. If Tally sends the number in 5 decimal places, DLL will round it off to 4 decimal places. Char String(1st character of String is used) Number, Date, Logical, Amount (Only the First letter) For e. g., if the number is 987, then the result char would be 9 and s i m i l a r l y, f o r t h e other data types. For Date, it depends on the Date Format. Single Character Byte/Unsigned char Number String, Amount 0 to 255 Short/Wchar Number String, Amount-32,768 to 32,767 Unsigned short Number String, Amount 0 to 65,535 | TDL_Reference_Manual.pdf |
What's New in Release 4. 61 390 Figure 1. COM Data Types The parameters can also be of the Other Permissible TDL data ty pes, as mentioned in the table, in place of the data types mentioned in the column titled 'TDL Data Type'. Irrespective of whether the parameter is an In, Out OR In Out parameter, T ally implicitly converts these data types to the respective COM Data Types. In Release 4. 6, while declaring the Parameters for COM Interface, only a limit ed number of data types could be accepted as data type for the parameter. Let's understand this with the help of the following example:Long Number String, Amount-2,147,483,648 to 2,147,483,647 Long Long Number String, Amount-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 Unsigned Long Number String, Amount 0 to 4,294,967,295 Unsigned Long Long Number String, Amount 0 to 18,446,744,073,709,551,615 Integer Number String, Amount-2,147,483,648 to 2,147,483,647 Unsigned Integer Number String, Amount 0 to 4,294,967,295 Bool/Boolean/ Logical Logical String (Yes/No, 0/1, True/False) True/False Date Date String Variant String, Number, Date, Logical, Amount This can be an Out or In Out parameter. The value for the data type can be any one of the following data types, viz String, Amount, Number, Date OR Logical. Scode Number String 0 to 4,294,967,295 This is a kind of an error code data type, used by Windows API. | TDL_Reference_Manual.pdf |