Type search words and press enter
TallyPrime now automatically fetches the distance between origin and destination pincodes, and prints it in the e-Way Bill. You no longer have to manually enter this distance. Download TallyPrime Release 5.1 now!
https://help.tallysolutions.com/docs/td9rel54/tdlreference/release_4_5.htm

What’s New in Release 4.5

The TDL language is enriched with new capabilities, based on emerging needs, from time to time. With the introduction of the new product Tally.Server 9, in this release, a few generic actions and functions have been introduced.

Platform Functions

Function - $$IsAccountingVch

This function checks if the specified voucher type is Accounting Voucher or not. It returns a logical value.

Syntax

$$IsAccountingVch : <VoucherTypeName>

Where,

< VoucherTypeName > is the name of the voucher type.

Example

Set As : $$IsAccountingVch:##TSPLSmp_Information

Function - $$IsInvVch

This function checks if the specified voucher type is Inventory voucher or not (excluding Order vouchers). It returns a logical value.

Syntax

$$IsInvVch : <VoucherTypeName>

Where,

< VoucherTypeName > is the name of the voucher type.

Example

Set As : $$IsInvVch:##TSPLSmp_Information

Function - $$IsPayrollVch

This function is used to check if the specified voucher type is Payroll Voucher or not. It returns a logical value.

Syntax

$$IsPayrollVch : <VoucherTypeName>

Where,

< V o ucher T ypeNam e > is the n a me of the vouc h er type.

Example

Set As : $$IsPayrollVch:##TSPLSmp_Information

Function - $$IsOrderVch

This function is used to check if the specified voucher type is Order Voucher or not. It returns a logical value.

Syntax

$$IsOrderVch : <VoucherTypeName>

Where,

< VoucherTypeName > is the name of the voucher type.

Example

Set As : $$IsOrderVch:##TSPLSmp_Information

Function - $$IsProdTallyServer

This function is used to check whether the product is Tally.Server 9 or not. It returns TRUE if the product is Tally.Server 9.

Syntax

$$IsProdTallyServer

Example

[Function : TSPL Smp IsProdTallyServer]

00 : If : $$IsProdTallyServer

10 : Msg Box : "Server Check" : "The Current Product\n is Tally Server"

20 : ELSE :

30 : MSGBOX : "Server Check" : "The Current Product\n is not Tally Server"

40 : ENDIF

Function - $$ExcelInfo

This function is used to get the Excel ‘version’ and to check whether ‘XLSX’ format is supported.

Syntax

$$ExcelInfo : <Keyword>

Where,

< Keyword > can be IsXLSXSupported or Version. The keyword IsXLSXSupported returns TRUE, if the format “xlsx” is supported, while Version returns the Excel version number.

Example

Set As : $$ExcelInfo:IsXLSXSupported

Function - $$IsServiceRunning

This function is used to check if the specified service is running or not. It returns TRUE if the service is running.

Syntax

$$IsServiceRunning : <Service Name>

Where,

< Service Name > can be any expression which evaluates to the name of the service.

Example

[Function : TSPL Smp IsServiceRunning]

00 : If : $$IsServiceRunning:"Tally.Server 9"

10 : MSG Box : "Service Check" : "The Current Service \n is Running"

20 : ELSE:

30 : MSGBOX : "Service Check " : "The Current Service \n is not Running"

40 : ENDIF

Function - $$IsServiceInstalled

This function is used to check if the specified service is installed on the system or not. It returns TRUE if the service is installed.

Syntax

$$IsServiceInstalled : <Service Name>

Where,

<Service Name> can be any expression, which evaluates to the name of the service.

Example

[Function : TSPL Smp IsServiceRunning]

00 : If : $$IsServiceInstalled:"AppMgmt"

10 : Msg Box : "Service Check" : "The Current Service \n is installed"

20 : ELSE :

30 : MSGBOX : "Service Check" : "The Current Service \n is not Installed"

40 : ENDIF

Function - $$ReadINI

The function is used to read the INI file, and get the value of any parameter in the INI.

Syntax

$$ReadINI : <Path\File Name> : <Section Name> : <Parameter> [: <Index>]

Where,

< Path\File Name > is the filename of the INI file, along with the path.

< Section Name > is the section name in the INI file.

< Parameter > is the Parameter whose value is to be fetched from the INI.

< Index > is an optional parameter. It can be used when multiple values for the same parameter are accepted.

Example

Set As : $$ReadINI:“C:\Tally.ERP9\tally.ini”:”TALLY”:”User TDL”

Function - $$IsUserAllowed

This function verifies and returns TRUE if user is allowed to perform the specified operation on current Tally.Server9.

Syntax

$$IsUserAllowed : <Username> : <Operation> : <Tally Server Name>

Where,

< User Name > is the name of the user.

< Operation > is the operation that the user wants to perform. This can be any one of BackUp, Restore, Rewrite, Create Company, Split Company and Monitor Tool.

< Tally Server Name > is the name of the Tally.Server 9

Example

Set as : $$IsU serAllo w ed:$Us e r_name1 :”Restor e”:##Sv T allySe r ver

Function - $$IsTSAuthorised

This function checks if security is enabled on the specified Tally.Server 9. It returns TRUE if security is enabled, else it returns FALSE.

Syntax

$$IsTSAuthorised : <TallyServer Name>

Where,

< Tally Server Name > is the name of the Tally.Server 9.

Example

[Function : TSPL Smp IsTSAuthorised]

00 : If : $$IsTSAuthorised:##SvTallyServer

10 : MSG Box : "Security Check" : "Security Control is Enabled"

20 : ELSE :

30 : MSGBOX : "Secuirity Check " : "Security Control \n is not Enabled"

40 : ENDIF

Function - $$TSPingInfo

This function is used to retrieve the information related to Tally.Server 9 like License mode, Number of license subscription days left, etc.

Syntax

$$TSPingInfo : <TallyServer> : <Keyword>

Where,

< Tally Server Name > is the name of the Tally Server.

< Keyword > can be any one of the keywords - Iseducational, LicenseExpiryDaysLeft and HasINFO.

HasINFO returns TRUE or FALSE depending on whether the client is able to get information for this Tally.Server 9 (otherwise Iseducational and LicenseExpiryDaysLeft  fail in a TDL expression).

Iseducational returns TRUE if the Tally.Server 9 is running in Educational mode.

LicenseExpiryDaysLeft returns the number of subscription days remaining.

Example

Set As : $$TSPingInfo:##SvTallyServer:##Ping_Operation

Function - $$IsTSCompany

This function checks whether the current company is opened through Tally.Server 9 or not. It returns a logical value.

Syntax

$$IsTSCompany : <Company Name>

Where,

< Company Name > is the name of the company.

Example

Set As : $$IsTSCompany:$CompanyStorage

Function - $$SelectedNonTSCmps

This function returns the total number of companies which are not loaded via Tally server, i.e., companies from local or shared data folders.

Syntax

$$SelectedNonTsCmps

Example

[Function : TSPL Smp IsProdTallyServer]

00 : If : $$SelectedNonTsCmps

10 : Msg Box : "Company Check" : $$SelectedNonTSCmps;+"Total Companies not loaded via Tally server is \n"

20 : ELSE:

30 : MSGBOX : " Company Check " : "All Companies Have been Opened Via Tally Server "

40 : ENDIF

Function - $$IsTSPath

This function checks whether the given path is Tally.Server path or not.

Syntax

$$IsTSPath : <Path>

Where,

< Path > is any expression, which evaluates to a Tally Server Name or a Data Location Name.

Example

Set As : $$IsTSPath:”Data1:”

Action Enhancements

Action - DisconnectUser

This action is used to disconnect the users from companies that are accessed from Tally.Server9. It will display a warning message to the clients to close the company within 2 minutes, before forcing a close.

Syntax

DisconnectUser : <Tally Server Name> : <Company Name> : <User Name>

Where,

< Tally Server Name > is the name of the Tally.Server9, from which the companies are being accessed.

< Company Name > is the name of the company to be disconnected. '*' can be used to specify all companies.

< User Name > is the name of the user to be disconnected from the company specified. '*' can be used to specify all the users across companies.

Example

Action : DisconnectUser : "HoServer" : * : "abc@abc.com"

Action - ForceDisconnectUser

It is used to forcefully disconnect users from companies that are accessed from Tally.Server 9.

Syntax

ForceDisconnectUser : <TallyServer Name> : <Company Name> : <User Name>

Where,

< Tally Server Name > is the name of the Tally.Server 9 from which the companies are being accessed.

< Company Name > is the name of the company to be disconnected. '*' can be used to indicate ‘all companies’.

< User Name > is the name of the user to be disconnected from the company specified. '*' can be used to indicate ‘all users across companies’.

Example

Action : ForceDisconnectUser : "HoServer" : * : "abc@abc.com"

Action - StartService

This action is used to start the specified service.

Syntax

StartService : <Service Name>

Where,

< Service Name > can be any expression which evaluates to the name of the service.

Example

Action : Start Service : "Tally.Server 9 - 1"

Action - StopService

This action is used to stop the specified service.

Syntax

StopService : <Service Name>

Where,

< Service Name > can be any expression which evaluates to the name of the service.

Example

Action : Stop Service : "Tally.Server 9 - 1"

Action - WriteINI

This action is used to Add/Alter the value of any parameter in the specified INI file.

Syntax

WriteINI : <Path\FileName> : <SectionName> : <Parameter> : [<Value> : [:<Index>]]

Where,

< Path\File Name > is the path and filename of the INI file

< Section Name > is the section name in the INI file

< Parameter > is the name of the parameter whose value is to be set in the INI.

< Value > is the value to be set for the given parameter. In the absence of any value, the existing value will be removed.

< Index > is an optional parameter. It can be used when multiple values are accepted for the same parameter. In the absence of the index parameter, the value of the last index will be updated.

Example

Action : WriteINI : “C:\Tally.ERP9\tally.ini” : ”TALLY” : ”UserTDL” : ”Yes”