System Related Functions
$$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
$$IsInternetActive
$$IsInternetActive is a function which helps to determine if the Internet is currently active. It returns TRUE if the Internet is accessible, else returns FALSE. It can be used to perform conditional operations, i.e., based on the Internet Connectivity, certain actions can be triggered.
This function checks if the internet is active, such that the operations pertaining to connecting to web pages, emailing, uploading files to FTP, etc., can be performed.
Syntax
$$IsInternetActive
Example
[Function : EmailifConnected]
00 : IF : $$IsInternetActive
;; Function called to Email O/s Stmts
10 : Call : Email Outstanding Statements
20 : ENDIF
In this example, the Outstanding Statements are E-Mailed, if Internet connection is present.
$$SysInfo
Use the function SysInfo to retrieve system-related information, like system date, operating system version, and so on. $$SysInfo accepts one parameter at a time, out of the 19 explained below.
Syntax
$$SysInfo : <Parameter>
where <parameter> is one of the values explained in the table below.
|
No. |
Parameter |
Description |
Example |
|
1 |
ApplicationPath |
The folder path where the current copy of Tally is running. |
C:/TallyPrime |
|
2 |
CurrentPath |
The data path configured in tally.ini, residing in the application path. |
C:/TallyPrime/Data |
|
3 |
SystemDate |
The system date. |
27-May-2017 |
|
4 |
SystemTime |
The system time. |
18:27 |
|
5 |
SystemTimeHMS |
The system time in hh:mm:ss format. |
18:27:36 |
|
6 |
SystemName |
The system name. |
TallyClient2 |
|
7 |
IsWindows |
Checks whether the system has Microsoft Windows operating system. |
Yes |
|
8 |
WindowsVersion |
The Microsoft Windows version with the build number. |
6.2 (9200) |
|
9 |
WindowsUser |
The name of the Windows user who has logged in. |
geetha.ram |
|
10 |
IPAddress |
The IP Address of the system. |
192.168.1.17 |
|
11 |
MACAddress |
The Media Access Control Address of the network adapter in the system. |
0720fhac027a |
|
12 |
RunningIPV4Addr |
The currently running Internet Protocol Version 4 address. |
192.168.1.17 |
|
13 |
RunningIPV6Addr |
The currently running Internet Protocol Version 6 address. |
2001:db8:85a3:8d3:1319:8a2e:370:7348 |
|
14 |
IsOSx64 |
Checks whether the operating system is 64-bit. |
Yes |
|
15 |
IsAdmin |
Checks whether the operating system is running in Admin mode. |
No |
|
16 |
TallyinAdminMode |
Checks whether TallyPrime is running in Admin mode. |
No |
|
17 |
UACStatus |
Checks whether the User Account Control is enabled. |
Yes |
|
18 |
SystemProxySettings |
The proxy settings in the system. |
192.168.1.17:8000 |
|
19 |
ModuleName |
The folder path and file name of the current application. |
C:/TallyPrime/tally.exe |
The function SysInfo is enhanced to get the file name of the current application with the folder path.
Example
$$SysInfo:ModuleName
If the application path is C:TallyPrime , it returns C:TallyPrimetally.exe .
$$MakeFTPName
Function $$MakeFTPName is used for creating the file transfer protocol, based on specifications.
Syntax
$$MakeFTPName : <FtpServer>: <FtpUser>: <FtpPassword>: <FtpPath>
Where,
<FtpServer>is the FTP server name.
<FtpUser>is the FTP user name.
<FtpPassword>is the FTP password.
<FtpPath>is the full path of the folder on the FTP server.
Example
$$MakeFTPName:”ftp://ftp.microsoft.com”:””:””:”dbook.xml”
$$MakeHTTPName
Function $$MakeHTTPName is used for creating the HyperText Transfer Protocol for the specified security features.
Syntax
$$MakeHTTPName : <HttpUrl>: <HttpIsSecure>: <HttpUserName>: <HttpPassword>: <CompanyName>
Where,
<HttpUrl>is the HTTP URL name.
<HttpIsSecure>is a logical attribute which checks whether the HTTP is secure or not.
<HttpUserName>is the HTTP user name.
<HttpPassword>is the HTTP password.
<CompanyName>is the name of the Company.
Example
$$MakeHTTPName:”https://www.abc.com”:Yes:”guestuser”:”pswd99″:”ABC Company Ltd”
$$MakeMailName
$$MakeMailName is used to construct the mail configuration string required by the Mail and Mail Report actions. It accepts email addresses, SMTP details, authentication details, and mail properties, and returns a formatted string that is used by the platform to send emails.
The function supports both password-based authentication and OAuth-based authentication. When a password is provided, it is automatically encrypted and Base64 encoded before being included in the generated output string.
Syntax
$$MakeMailName : <To Address> : <SMTP Server Name> : <From Address> : <CC Address> : <Subject> : <User Name> : <Password> : <Use SSL Flag> : <Use SSL On Standard Port> : <BCC Address>
Where
- <To Address> is the recipient email address.
- <SMTP Server Name> is the SMTP server and port used to send the email.
- <From Address> is the sender email address.
- <CC Address> is the email address to which a copy of the email is sent.
- <Subject> is the subject of the email.
- <User Name> is the authentication user name.
- <Password> is the authentication password. For OAuth-based authentication, this can be left empty.
- <Use SSL Flag> specifies whether SSL should be used (Yes/No or True/False).
- <Use SSL On Standard Port> specifies whether SSL should be used on the standard SMTP port.
- <BCC Address> is the blind carbon copy recipient email address.
Behavior
- Returns a formatted mail configuration string used by the Mail and Mail Report actions.
- Supports both password-based and OAuth-based email authentication.
- When a password is provided, it is automatically encrypted and Base64 encoded in the generated output.
- If a password is supplied, the platform attempts password-based authentication.
- If the password is empty and an OAuth provider is configured, OAuth authentication is used.
- The returned string can also be used with $$ValidateMailSenderDetails for validating sender configuration before sending email.
Example
[Function: TSPL AutoMailBalanceSheet]
60 : Call : SetOAuthProviderFromEmailId : ##SVMailFromAddress
70 : Set : SVPrintFileName : $$MakeMailName:ToAddress:MailServer:FromAddress:CCAddress:MailSubject:UserAddress:””:True:No:BCCAddress
In the above example, a mail configuration string is generated for sending email through OAuth authentication. The password parameter is passed as an empty string, allowing the platform to use the OAuth session associated with the sender email account.
