Explore Categories

 

 PDF

Generic Functions

IsUserAllowed

This function verifies and returns TRUE if user is allowed to perform the specified operation on current TallyPrime Server/Tally.Server 9.

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 TallyPrime Server/Tally.Server 9

Example

Set as : $$IsUserAllowed:$User_name1:”Restore”:##SvTallyServer

IsTSAuthorised

This function checks if security is enabled on the specified TallyPrime Server/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 TallyPrime Server/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

TSPingInfo

This function is used to retrieve the information related to TallyPrime Server/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 TallyPrime Server/Tally.Server 9.

<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

IsTSCompany

This function checks whether the current company is opened through TallyPrime Server/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

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

$$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:”

$$IsTDLLoaded

A new function ‘IsTDLLoaded’ has been introduced to check if a particular TDL is already loaded. This function returns TRUE if the particular TDL/TCP file is already loaded, and FALSE if it is not.

Based on the result of this function, further actions like Loading and Unloading of TDL, or executing a Report from the dynamically loaded TDL File, etc., can be performed.

Syntax

$$IsTDLLoaded : <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 loaded or not.

Example

[Function : Display First TDL Report]

00 : If : $$IsTDLLoaded:@@TCPFileGUID

10 : Display : First TDL Report

20 : Unload TDL : @@TCPFileGUID

30 : End If

[System : Formula]

TCPFileGUID : “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.

$$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’.

$$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’.

$$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’.

$$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’.

$$ImportInfo

The function $$ImportInfo is useful to extract the details of the Imported Objects in terms of Number of Objects Created, Altered, Ignored, Combined, etc., and Errors encountered. This Function accepts a parameter ‘InfoType’.

Note: For details of the  functions $$HttpInfo$$ ImportType $$ImportAction $$LastImportError and $$ImportInf, refer to the section ‘Data Importing Enhancements’.

$$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:”TallyPrime Server/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

$$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

$$IsProdTallyServer

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

Syntax

$$IsProdTallyServer

Example

[Function : TSPL Smp IsProdTallyServer]

00 : If : $$IsProdTallyServer

10 : Msg Box : “Server Check” : “The Current Productn is Tally Server”

20 : ELSE 

30 : MSGBOX : “Server Check” : “The Current Productn is not Tally Server”

40 : ENDIF

$$ReadINI

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

Syntax

$$ReadINI : <PathFile Name> : <Section Name> : <Parameter> [: <Index>]

Where,

<PathFile 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”

$$FileReadRaw

We have a function $$FileRead to read the contents from a text file, which was designed to ignore quotes, comments, spaces, etc., while reading the entire line. Now, a new function $$FileReadRaw has been introduced, similar to the Function $$FileRead, except that the Function $$FileReadRaw can read lines with:

  • Quotes
  • Comment characters (; /* */)
  • Spaces & Tabs

Syntax

$$FileReadRaw[:<Number>]

Where,

<Number> denotes the number of characters to be read.

Example

[Function : Test FileReadRaw]

Variable : GetPath : String

Variable : Get_DownLoad_FileLine : String

000 : Set       : GetPath : “C:\TextSource.txt”

010 : Open File : ##GetPath : Text : Read

020 : While     : (TRUE)

030 : Set       : Get_DownLoad_FileLine : $$FileReadRaw

Using this function, we can read lines with quotes, comment characters, spaces, tabs, etc. If $$FileReadRaw is specified with a parameter, the behaviour is the same as that of Function $$FileRead. If specified without parameters, the entire line is read without ignoring quotes, spaces, etc.

$$ListValue

It is used to retrieve the value of an element in the list for a given key. If the list is of compound Variables, an optional member specification can be given to extract value of a specific member.

Syntax

$$ListValue : <List Variable Specification> : <Key Formula> [:<Member Specification>]

Where,

<List Variable Specification> is the Simple List or Compound List Variable specification.

<Key Formula> can be any expression which evaluates to a string value.

<Member Specification> is required only if the value needs to be extracted from a specific memeber of a Compound List Variable.

Example

Retrieving value from Simple List Variable using $$List Value

$$ListValue:SLVEMP:”E001″

In this example, the function returns the value of the element identified by the key ‘E001’ from the simple list variable  ‘SLV Emp’.

$$ListValue:SLVEMP:##KeyVar

In this example, the variable ‘KeyVar ’ holds the key value. The function returns the value of the element identified by the key from the simple list variable SLV Emp.

Retrieving value from Compound List Variable using $$LISTValue

$$ListValue:CLVEmp:##KeyVar:Age

In this example, the variable KeyVar holds the key value. The function returns the identified Compound List Variable elements member Variable value. In this case, the member specification has been specified as ‘Age’. 

$$ListValueEx

The function $$ListValueEx returns the value of an element at the specified index in the list.

Syntax

$$ListValueEx : <List Variable Specification>:<Index Formula> [:<Member Specification>]

Where,

<List Variable Specification> is the Simple or Compound List Variable specification.

<Index Formula> can be any expression which evaluates to an index number.

<Member Specification> is required only if the value needs to be extracted from a specific member of a Compound List Variable.

Example

Retrieving value from Simple List Variable using $$List Value Ex

$$ListValueEx:SLVEmp:##IndexVar

In this example, the variable ‘IndexVar’ holds the index value. The function returns the value of the elementidentified by the index from the simple list variable ‘SLV Emp’.

Retrieving value from Compound List Variable using $$ListValueEx.

$$ListValueEx:CLVEmp:##IndexVar:Age

Here, Variable ‘Key Var’ holds the index value. The function returns the identified Compound List Variable element’s member variable value. Here, the member specified is ‘Age’.

$$ListCount

The function $$ListCount gives the total number of values available in the list variable.

Syntax

$$ListCount : <List Var Name>

Where,

<List Var Name> is the name of the list variable.

Example

$$ListCount:TestFuncVar

The action returns the number of items in the list variable ‘Test func Var’ when it is executed.

$$ListFind

The function ListFind is used to search if the value belonging to a specific key is available in the list variable. If the key is found, $$ListFind returns TRUE, otherwise it returns FALSE.

Syntax

$$ListFind : <List Var Name> : <Key Formula>

Where,

<List Var Name> is the name of the list variable.

<Key Formula> can be any expression formula, which evaluates to a string value.

Example

$$ListFind:TestFuncVar:”Mobile”

It returns TRUE if the key ‘Mobile’ is present in list variable ‘Test func Var’, else returns FALSE.

$$ListKey

The function $$ListKey returns the corresponding key f o r the given index.

Syntax

$$ListKey : <List Variable Specification> : <Index Specification>

Where,

<List Variable Specification> is the Simple List or Compound List Variable specification.

<Index Specification> can be any expression which evaluates to a number.

Example

Retrieving key from a simple List Variable using $ $ListKey

01 : LOG : $$ListKey:SLVEMP:2

In this example, the function $$ListKey retrieves the Key of the second element of the Simple List Variable ‘SL VEMP’.

Retrieving key from a Compound List Variable using $$ListKey

02 : LOG : $$ListKey:CLVEmp[1].Relatives:1

Here, key of first element of Compound List  variable ‘Relatives’ is retrieved. ‘Relatives’ i same member of Compound List Variable ‘CLVEMP’.

$$ListIndex

The function $$ListIndex returns the Corresponding index for the given Key .

Syntax

$$ListIndex : <List Variable Specification> : <Key Specification>

Where,

<List Variable Specification> is the Simple List or Compound List Variable specification.

<Key Specification> can be any expression which evaluates to a string value.

Example

Retrieving index from a simple List Variable using ListIndex

01 : LOG : $$ListIndex:SLVEMP:E001

Here, index of the element identified by the key value ‘E001 ’ is retrieved from ‘SLVEMP’.

Retrieving index from a Compound List Variable using $$ListIndex

02 : LOG : $$ListIndex:CLVEmp:E001

Here, index value of the element identified by the key value ‘ E001’ is retrieved from ‘CLVEMP’.

$$ListValueFind

This function can be used to check if a given value exists in the list. If a given list has more than one same value, the index can be used to retrieve then’th matching value.

Syntax

$$ListValueFind : <List Variable Specification> : <Occurrence Specification> : <Value Formula> [:<Member Specification>]

Where,

<List Variable Specification> is the Simple List or Compound List Variable specification.

<Occurrence Specification> can be any expression which e valuates to a number.

<Value Formula> can be any expression which evaluates to a value.

<Member Specification> can be specified if the list element is compound. It is optional.

Example

;; Finding value from the Simple List Variable

01 : LOG : $$ListValueFind:SLVEMP:1:RAMESH

;;Finding value from the Compound List Variable with member specification

03 : LOG : $$ListValueFind:CLVEmp:1:PRIYA:Name

The function will return YES if the value exists in the list, else it will return NO.

$$MakeExportName 

The function $$MakeExportName suffixes the extension based on the export format if only the file name is passed as a parameter.

Syntax

$$MakeExportName : <String Formula>: <Export format>

Where,

<String Formula>is a string formula which evaluates to the path \  filename.

<Export format>is the name of the format which has to be used while exporting.

Example

$$MakeExportName : “C:\Tally.ERP\abc.xls” : Excel

$$TgtObject

As we already know, apart from Interface (Requestor) and current Data Object Context, there is one more context available with reference to User Defined Functions and Aggregate Collections, i.e, the Target Object Context. In case of functions, the object being manipulated is the Target Object. In case of aggregate Collection, the object being populated in the resultant collection is the Target Object.

There are scenarios where the expression needs to be evaluated in the context of the Target object. In such cases, the function $$ TgtObject can be used. Using $$TgtObject, values can be fetched from the target object without setting the target object as the current context object.

Syntax

$$TGTObject : <Expression>

Example: 1

Consider writing a Function to import a Voucher from Excel, wherein the Source Object is the Collection gathered out of Objects in an Excel Worksheet, the Target Object being the Voucher and its sub objects. While setting value to Inventory Entries sub-object, the Target Object is changed to Inventory Entries and the Source Object continues to be Excel Objects. In order to set values to the methods Quantity and Rate, Stock Item context is required since Unit Information is available for Item. Hence, $$TGTObject Function is prefixed to the Expression @ BillQty and @ BillRate , in order to evaluate these Methods in the context of the Target Object, which is the ‘Inventory Entries’ Object.

[Function : Import Voucher]

Local Formula : BillQty : $$AsQty:$ExcelBilledQty

Local Formula : BillRate : $$AsRate:$ExcelItemRate

90 : INSERT COLLECTION OBJECT : Inventory Entries

100 : SET VALUE : BilledQty : $$TgtObject:@BillQty

110 : SET VALUE : Rate : $$TgtObject:@BillRate

120 : SET TARGET ..

130 : SAVE TARGET

Example:2

Consider another example where, while populating a summary collection of Sales Vouchers, we need to track the maximum sales amount for each Item with the date on which the maximum sales was triggered.

[Collection : Src Voucher]

Type    : Vouchers : VoucherType

ChildOf : $$VchTypeSales

[Collection : Summ Voucher]

Source Collection : Src Voucher

Walk              : Inventory Entries

By : ItemName     : $StockItemName

;; The following returns the Date and Amount for an Item, on which Maximum sales has happened

Aggr Compute : MaxDate : SUM : IF $$IsEmpty:$$TgtObject:$MaxItemAmt OR $$TgtObject:$MaxItemAmt <$Amount THEN $Date ELSE $$TgtObject:$MaxDate

;; MaxItemAmt is a method in the Target Object. Hence, the function $$TgtObject is used to evaluate the Method

;; MaxItemAmt in Target Object Context

Aggr Compute : MaxItemAmt : MAX : $Amount

In this example, while populating the Summary Collection, Method MaxItemAmt is being computed for Maximum Amount. Subsequently, Date is also computed by validating if the current object’s Amount is greater than the previous computed Amount. Since Maximum Amount so far is computed and accumulated in the Target Object being populated, we need to access it using the function $$TGTObject. Hence, $$TgtObject:$MaxItemAmt evaluates the method MaxItemAmt in the context of the computed Target Object MaxItemAmt.

$$TgtObject

The new context evaluation function TgtObject evaluates the expression in the context of the Target Object. Using TgtObject, values can be fetched from the target object without making the target object as the context object.

Syntax

$$TgtObject : <String Expression>

Where,

<String Expression> is the expression which will be evaluated in the context of Target Object.

Usage of $$TgtObject in User Defined Functions

In a user-defined function, while setting the method values of the target object, the expression needs to be evaluated in the context of the target object itself. $$TgtObject is used in this case.

Example

Ledgers ‘Party 1’ and ‘Party 2’ are having some opening balance. The requirement is to add the opening balances of both ledgers and set the resultant value as the opening balance of Party 2.

[Function : Sample Function]

Object : Ledger : “Party 1”

00 : NEW OBJECT : Ledger : “Party 2”

01 : SET VALUE : OpeningBalance : $OpeningBalance + $$TgtObject:$OpeningBalance

02 : ACCEPT ALTER

;; By prefixing $$TgtObject to the opening balance, the closing balance of the Target Object, i.e., Party 2, is retrieved.

Here, ‘Party 1’ is the Source object and ‘Party 2’ is the Target object. The opening balance of ‘Party 2’ is accessed using the expression $$TgtObject:$OpeningBalance.

Usage of $$TgtObject in Collections

In simple collections, the source object and the target object are both the same. In the case of aggregate collections and user-defined functions, the target object is different.

The function $$TgtObject allows accessing the values from the target object itself, while the collection is being populated. It is required in the aggregate collection, where the source object is not the same as the target object.

The function $$TgtObject is useful when the values are to be populated in the collection, based on the values that have been computed earlier. In aggregate collections, the function $$TgtObject can be used in the attributes Fetch, Compute and Aggr Compute of collection.

Example

A report is to be designed for displaying the stock item, the date on which the maximum quantity of the item is sold and the maximum amount is received. The collection is defined as follows:

[Collection : Src Voucher]

Type : Vouchers : VoucherType

ChildOf : $$VchTypeSales

[Collection : Summ Voucher]

Source Collection : Src Voucher

Walk              : Inventory Entries

By : ItemName     : $StockItemName

Aggr Compute      : MaxDate : SUM : IF $$IsEmpty:$$TgtObject:$ItemDet OR +                                                   $$TgtObject:$ItemDet < $Amount THEN $Date +                                                   ELSE $$TgtObject:$MaxDate

Aggr Compute      : ItemDet : MAX : $Amount

While creating a collection “Summ Voucher”, $$TgtObject is used to get the date on which the maximum sales amount is received for each stock item. $ItemDet gives the maximum amount received for the individual item. In the condition checking part, if the evaluated $ItemDet is empty for the stock item or is less than the current amount of the stock item of the source object, then the current date is selected, otherwise, the value of $MaxDate is retained.

Following Table shows the evaluation of values with respect to the target object:

Source Object

Current Objects

Target Objects

3 Sales Voucher

8 Inventory Entries

3

Sales Voucher -1 Dated – 7/7/09

Item 1 – Rs.500

Item 2 – Rs.500

Item 3 – Rs.500

Item 1 – 7/7/09 – Rs 500

Item 2 – 9/7/09 – Rs 700

Item 3 – 8/7/09 – Rs 800

Sales Voucher -2 Dated – 8/7/09

Item 1 – Rs.400

Item 3 – Rs.800

Sales Voucher -3 Dated – 9/7/09

Item 1 – Rs.300

Item 2 – Rs.700

Item 3 – Rs.500

$$TgtFile

All the file accessing functions, for both text and excel files, operate on the source file context. The function $$TgtFile can be used to switch to the target file context temporarily. It evaluates the expression passed, in the context of the target file.

Syntax

$$TgtFile:<Expression>

Example

In this example, the objective is to Read the contents of a cell in Sheet 1 and copy it to a cell in the Sheet 2 of the same file. The function opens the File “ABC.xls” in ‘Write’ mode.

[Function : Sample Func]

Variable : Temp : String

10 : SET : Temp : “”

20 : OPEN FILE : “Output.xls” : Excel : Write

30 : ADD SHEET : “Sheet 1”

40 : WRITE CELL : 1 : 1 : “Item A”

50 : SET : Temp : $$TgtFile:$$FileReadCell:1:1

60 : ADD SHEET : “Sheet 2”

70 : WRITE CELL : 1 : 1 : ##Temp

80 : CLOSE TARGET FILE

In this example, there is no file present in the source file context, as the file is opened in the ‘Write’ mode. In such case, for reading a value from Sheet 1, the expression $$FileReadCell:1:1 will return no value. Prefixing the expression with $$TGTFile will temporarily change the context to Target File for the evaluation of the expression, and will fetch the value from the cell 1 of Sheet 1, existing in the Target File context.

$$FileSize

This function will return the size of the file, specified in bytes. It takes an optional parameter. If the parameter is not given, then it works on the current context file and returns the size.

Syntax

$$FileSize [:<FileName>]

Where,

<FileName> is an expression, which evaluates to the file name, along with the path.

Example

10 : Log : $$FileSize:“Output.xls”

It gives the size of the Excel file ‘output.xls’, in terms of bytes.

$$FileRead

This function is used to read data from a text file. It takes an optional parameter. If the parameter is not specified or has value as 0, it reads one line and ignores the ‘end of line’ character. However, file pointer is positioned after the ‘end of line’ character, so that the next read operation starts on the next line. If the no. of characters is mentioned, it reads that many no. of characters.

Syntax

$$FileRead [:<CharsToRead>]

Where,

<CharsToRead> can be any expression which evaluates to the number of characters to be read.

Example

10 : OPEN FILE : “Output.txt” : Text : Read

20 : LOG : $$FileRead

30 : CLOSE FILE

In this example, the first line of the text file ‘Output.txt’ is being read.

$$FileIsEOF

This function is used to check if the current character being read is the End of file character.

Syntax

$$FileIsEOF

$$FileReadCell

This function returns the content of the cell identified by the mentioned row number and column number of the active sheet.

Syntax

$$FileReadCell : <Row No> : <Column No>

Where,

<Row No> and <Column No> can be any expression which evaluates to a number used to identify the row number and the column number.

Example

10 : OPEN FILE : “Output.xls” : Excel : Read

20 : SET ACTIVE SHEET : “Sheet 1”

20 : Log : $$FileReadCell:1:1

The function $$FileReadCell Logs the contents of the first cell of the excel sheet ‘Sheet 1′.

$$FileGetSheetCount

This function returns the number of sheets in the current workbook.

Syntax

$$FileGetSheetCount

Example

10 : OPEN FILE : “Output.xls” : Excel : Read

20 : Log : $$FileGetSheetCount

The function $$FileGetSheetCount returns the total number of sheets in the Excel sheet ‘Output.xls’.

$$FileGetActiveSheetName

This function returns the name of the active sheet.

Syntax

$$FileGetActiveSheetName

Example

10 : OPEN FILE : “Output.xls” : Excel : Read

20 : Log : $$FileGetActiveSheetName

The name of the active sheet is returned after opening the Excel file ‘Output.xls’.

$$FileGetSheetName

This function returns the name of the sheet at a specified index.

Syntax

$$FileGetSheetName : <Sheet Index>

Where,

<Sheet Index> can be any expression which evaluates to a number as the Sheet Index.

Example

10  : OPEN FILE : “Output.xls” : Excel : Read

Log : $$FileGetSheetName:1

The function $$FileGetSheetName gives the name of the sheet at a particular index.

$$FileGetSheetIdx

This function returns the Index of the sheet for a specified sheet name.

Syntax

$$FileGetSheetldx : <Sheet Name>

Where,

<Sheet Name> can be any expression which evaluates to the name of the Excel Sheet.

Example

10 : OPEN FILE : “Output.xls” : Excel : Read

20 : Log : $$FileGetSheetIdx:“Ledgers”

The function $$FileGetSheetIdx gives the index number of the sheet name.

$$FileGetColumnName

This function gives the column name in terms of alphabets for the given index.

Syntax

$$FileGetColumnName:Index

Where,

<Index> can be any expression which evaluates to the Index number.

Example

10 : OPEN FILE : “Output.xls” : Excel : Read

20 : Log : $$FileGetColumnName:10

The function $$FileGetColumnName returns the value J .

$$FileGetColumnldx

This function returns the index of the column for a given alphabetical name.

Syntax

$$FileGetColumnldx : <Name>

Where,

<Name> can be any expression which evaluates to the name of the column in alphabets.

Example

10 : OPEN FILE : “Output.xls” : Excel : Read

20 : Log : $$FileGetColumnIdx:AA

The function $$FileGetColumnIdx returns the value as 27.

$$ExclEvaluate

This function, when prefixed to an expression, helps in evaluating it without establishing the link with the UI elements. There may be a few cases where the programmer would not want the system to establish relationship between the caller and the object being accessed, to refresh the value in subsequent modification. In such cases, prefixing $$ExclEvaluate would indicate the same to the system.

Example

[Variable : My Variable]

Type : String

[Field : My Field]

Type   : String

Set as : $$ExclEvaluate:##MyVariable

                   OR

Set as : $$ExclEvaluate:$$MyUserFunction

[Function : My User Function]

Returns : String

01 : LOG : ##MyVariable

02 : RETURN : “Constant String”

Post a Comment

Is this information useful?
YesNo
Helpful?