Table of Contents

 

 PDF

Functions

$$GetMethodNameValue 

When reading or consuming a xml or json content, to extract the values of the tags, the tags are accessible as methods in TDL. By default, the tags that contain certain special characters (For example {application-Num: “10”} ) cannot be parsed and interpreted for value extraction. In these scenarios, the function ‘GetMethodNameValue’ is used.  

Syntax 

$$GetMethodNameValue: <The tag name in double quotes> 

Example 

JSON Content to be read 


“cat.ledname”: “Arobine Party”
}

The value in the tag “cat.ledname” having the special character dot (.) is extracted using the unction GetMethodNameValue 

[Collection: CAT Ledgers SC] 

Data Source : HTTP JSON Ex : “https://webhook.site/9ecdcd81-b7f9-40b6-9fa3-453c9a914baf” 

[Report: CAT Ledger List SC] 

 

 

[Part: CAT Ledger Part SC] 

Lines       : CAT Ledger Line SC 

Repeat      : CAT Ledger Line SC : CAT Ledgers SC 

 

…. 

[Field: CAT Led Name SC] 

Use         : Name Field 

 Set as      : $$GetMethodNameValue:”cat.ledname”      

$$HTTPInfo 

It is used to get the details of URL Host, Content Length and Header information available during the receiving of the SOAP request. It accepts two parameters – ‘InfoType’ and ‘Info Sub Type’. 

Syntax 

$$HTTPInfo:<InfoType>[:<InfoSubType>] 

Where, 

<InfoType> The type of information which can be URL, Header, ContenLength 

<InfoSubType> Optional parameter applicable only when the <InfoType> is Header. This takes the name of the HTTP header, whose value needs to be retrieved.  

Example 

When vouchers are imported in XML or JSON format, the response report will generate a response where the function HTTPInfo is used to send the details of request like the url, contentlength and the header details. 

[#Import File: Vouchers] 

Option : TSPL Smp Custom Response Report 

[!Import File: TSPL Smp Custom Response Report] 

Response Report : TSPL Smp ResponseRpt 

;; Response Reports 

[Report: TSPL Smp ResponseRpt] 

 

 

[Field: TSPL Smp ImportInfoCreated] 

Set as : $$ImportInfo:Created 

XMLTag: “Created” 

[Field: TSPL Smp ImportInfoAltered]  

Set as : $$ImportInfo:Altered 

XMLTag: “Altered” 

[Field: TSPL Smp ImportInfoCombined]  

Set as : $$ImportInfo:Combined 

XMLTag: “Combined” 

[Field: TSPL Smp ImportInfoIgnored] 

Set as : $$ImportInfo:Ignored 

XMLTag: “Ignored” 

[Field: TSPL Smp ImportInfoErrors]  

Set as : $$ImportInfo:Errors 

XMLTag: “Errors” 

$$LastImportError 

The function $$LastImportError can be used to extract the Import error description for the last object imported, which is helpful to retrieve after every import, and appropriate error logs can be maintained and displayed at the end of the Import Process. In case there is no Error while Importing the current Object, it would return the value as ‘Empty’. 

Syntax 

$$LastImportError 

Example 

Here, during import of vouchers, the error after import of every voucher object is logged using the function $$LastImportError. 

[#Import File: Vouchers] 

Option : TSPL Smp Import Events 

[!Import File: TSPL Smp Import Events]  

;; This Event After Import Object is triggered for each Object 

Add: On: After Import Object: Yes: Call: TSPL Smp LogInfo: “After Import Object – ” + $$ImportAction + ” – ” +( If $$Isempty:$$LastImportError then “No Error” else $$LastImportError)+ ” – ” + $$ImportType 

[Function: TSPL Smp LogInfo] 

Parameter : pLogInfo : String : “” 

40 : Log : ##pLogInfo 

$$ImportType 

The function $$ImportType is used to determine the type of Import, i.e., the source of data. The possible Import Types could be ‘Sync’, ‘Migration’, ‘Remote’, ‘NatLang’, ‘SOAP’ or ‘Manual’. 

Syntax 

$$ImportType 

Example 

Here, during import of vouchers, the type of import after import of every voucher object is logged using the function $$ImportType. 

[#Import File: Vouchers] 

Option : TSPL Smp Import Events 

[!Import File: TSPL Smp Import Events]  

;; This Event After Import Object is triggered for each Object 

Add: On: After Import Object: Yes: Call: TSPL Smp LogInfo: “After Import Object – ” + $$ImportAction + ” – ” +( If $$Isempty:$$LastImportError then “No Error” else $$LastImportError)+ ” – ” + $$ImportType 

[Function: TSPL Smp LogInfo] 

Parameter : pLogInfo : String : “” 

40 : Log : ##pLogInfo 

$$ImportAction 

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’, ‘Ignored’, ‘Combined’, and ‘Error’. 

Syntax 

$$ImportAction 

Example 

Here, during import of vouchers, the status of the import of every voucher object is logged using the function $$ImportAction. 

[#Import File: Vouchers] 

Option : TSPL Smp Import Events 

[!Import File: TSPL Smp Import Events]  

;; This Event After Import Object is triggered for each Object 

Add: On: After Import Object: Yes: Call: TSPL Smp LogInfo: “After Import Object – ” + $$ImportAction + ” – ” +( If $$Isempty:$$LastImportError then “No Error” else $$LastImportError)+ ” – ” + $$ImportType 

[Function: TSPL Smp LogInfo] 

Parameter : pLogInfo : String : “” 

40 : Log : ##pLogInfo 

$$TplLine 

To support the capability Customisation using Productivity Suites, one of the function $$TPlLine is introduced to provide line number or object index number in the current collection, where the paragraph or rows of the document template are repeated. 

Syntax 

$$TplLine 

Example 

[Form: InvFrm] 

Resource : InvoiceWord 

XML Map  : Line : $$TplLine 

$$WordInfo 

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 IsDocxSupported. 

  • Version – to get the version number of MS Word. 
  • IsDocxSupported – to check whether the .docx format is supported or not. 

Syntax 

$$WordInfo:<Info Type> 

Where, 

<Info Type> has two values, i.e., Version and IsDocxSupported 

Example 

Set as : $$WordInfo:Version 

Set as : $$WordInfo:IsDocxSupported 

$$ExcelInfo 

This function helps to find whether MS Excel is installed in the system or not. It accepts any one parameter, i.e., Version or IsXlsxSupported. 

  • Version – to get the version number of MS Excel. 
  • IsXlsxSupported – to check whether the .xlsx format is supported or not. 

Syntax 

$$ExcelInfo:<Info Type> 

Where, 

<Info Type> has two values, i.e., Version and IsXlsxSupported 

Example 

Set as : $$ExcelInfo:Version 

Set as : $$ExcelInfo:IsXlsxSupported 

The behavior of different versions of MS Office in the use of $$ExcelInfo and $$WordInfo are as shown below: 

MS Office 

Version 

Docx Supported 

Xslx Supported 

2003 

11 

No 

No 

2007 

 

 

 

2010 

14 

Yes 

Yes 

2013 

15 

Yes 

Yes 

$$IsFileTypeSupported 

It returns the logical value, whether the provided format is supported in the system or not. 

Syntax 

$$IsFileTypeSupported:<document extension> 

Where, 

<document extension> is the type of file extension. 

Example 

$$IsFileTypeSupported:”.odt” 

$$IsFileTypeSupported:”.ods” 

The behavior of different versions of MS Office are as shown below: 

MS Office 

.odt Supported 

.ods Supported 

2003 

No 

No 

2007 

No 

No 

2010 

No 

No 

2013 

Yes 

Yes 

TallyHelpwhatsAppbanner
Is this information useful?
YesNo
Helpful?
TARA