Vous êtes sur la page 1sur 3

Home

RTSlink DLL

More on Tally Integration

/ TDL

Functions

TDL Functions
An Alphabetical-list of TDL functions (Partial list) is provided herewith for your reference.
Function $$ Abs Syntax $ $Abs : <Expression> Return Value Same as parameter type Remarks Returns the absolute (positive ) value for the given expression $ $ Alias returns alternate value for the current Object. Stock Item and Ledger have Alias name. Example :Fetch Ledger-Alias using SQLRequest () Checks whether the current user has permission to access the specified object or report. $ $ CollectionList function is used to fetch the nth Method/field of a Collection . Sample program using $ $CollectionList function Returns the Period starting date Returns the Period ending date $ $ FullList function is used to fetch any Method /Field of a Collection . The Method /Field values are separated by commas . Returns true if the selected mode is Print , otherwise false . Refer program TDL42 Checks whether the specified VoucherType is Contra Checks whether the specified VoucherType is CreditNote Checks whether the specified VoucherType is DebitNote Checks whether the specified VoucherType is Delivery Note Checks whether the parameter passed is empty or not. Parameter type can be String; Numeric; Date; Logical $$ IsEmpty $ $IsEmpty : <parameter > Logical Example :$ $ IsEmpty: $$ Value Refer program TDL34 $$ IsFirstObject $$ IsJournal $$ IsMemo $$ IsPayment $$ IsPhyStock $$ IsPurchase $$ IsPurcOrder $$ IsRcptNote $$ IsReceipt $$ IsRejIn $$ IsRejOut $$ IsRevJrnl $$ IsSales $$ IsSalesOrder $$ IsStockJournal $ $IsFirstObject $ $IsJournal : <VoucherTypeName> $ $IsMemo : <VoucherTypeName> $ $IsPayment : <VoucherTypeName> $ $IsPhyStock : <VoucherTypeName> $ $IsPurchase : <VoucherTypeName> $ $IsPurcOrder : <VoucherTypeName> $ $IsRcptNote : <VoucherTypeName> $ $IsReceipt : <VoucherTypeName> $ $IsRejIn : <VoucherTypeName> $ $IsRejOut : <VoucherTypeName> $ $IsRevJrnl : <VoucherTypeName> $ $IsSales : <VoucherTypeName> $ $IsSalesOrder : <VoucherTypeName> $ $IsStockJournal : <VoucherTypeName> Logical Logical Logical Logical Logical Logical Logical Logical Logical Logical Logical Logical Logical Logical Logical Returns true if the current Object is the 1 st object of the Collection . Refer program TDL42 Checks whether the specified VoucherType is Journal Checks whether the specified VoucherType is Memo Checks whether the specified VoucherType is Payment Voucher Checks whether the specified VoucherType is PhysicalStock Voucher Checks whether the specified VoucherType is Purchase Voucher Checks whether the specified VoucherType is Purchase Order Voucher Checks whether the specified VoucherType is ReceiptNote Voucher Checks whether the specified VoucherType is Receipt Voucher Checks whether the specified VoucherType is RejectionIn Voucher Checks whether the specified VoucherType is RejectionOut Voucher Checks whether the specified VoucherType is Reverse Journal Voucher Checks whether the specified VoucherType is Sales Voucher Checks whether the specified VoucherType is Sales Order Voucher Checks whether the specified VoucherType is StockJournal Voucher

$$ Alias

$ $Alias

String

$$ Allow

$ $Allow : <mode> : <family -report -name> $ $CollectionList : <Method/Field > : <PositionNumber > : <Collection > $ $DateFrom $ $DateTo $ $FullList : <Collection > : <FieldList > $ $InPrintMode $ $IsContra : <VoucherTypeName> $ $IsCreditNote : <VoucherTypeName> $ $IsDebitNote : <VoucherTypeName> $ $IsDelNote : <VoucherTypeName>

Logical Method / Field Datatype Date Date Method / Field Datatype Logical Logical Logical Logical Logical

$$ CollectionList $$ DateFrom $$ DateTo $$ FullList $$ InPrintMode $$ IsContra $$ IsCreditNote $$ IsDebitNote $$ IsDelNote

Function $$ LocaleString

Syntax $ $LocaleString : <string>

Return Value Unicode string

Remarks Accepts a string parameter and returns unicode string. This is to provide multi -lingual support to Tally Checks whether the Field value of the <Field> is equal to the < ExpC> Example : $ $ IsVchTypeOfFamily: $ VoucherTypeName : "Payment " Remarks : The function $ $IsVchTypeOfFamily returns true if the Field-value of $VoucherTypeName is "Payment" Returns the Date as per your computer system settings

$$ IsVchTypeOf Family

$ $IsVchTypeOfFamily :<VoucherTypeName>

Logical

$$ MachineDate

$ $MachineDate

Date

Example :Select $ $MachineDate from Company Returns the Time as per your computer system settings

$$ MachineTime

$ $MachineTime

String

Example :Select $ $MachineTime from Company Returns the Miniimum value. The parameter type can be Numeric , Date or String Example :$ $ Max:100:15 returns 100 Returns the Miniimum value. The parameter type can be Numeric , Date or String Example :$ $ Min:100:15 returns 15 Returns the ending date of the specified month.

$$ Max

$ $Max : <Expression>

Same as parameter type

$$ Min

$ $Min : <Expression>

Same as parameter type

$$ MonthEnd

$ $MonthEnd: < ExpD>

Date

Example :Select $ $MonthEnd:$ $ MachineDate from Company Returns the Month (example 12) of the specified date

$$ MonthOfDate

$ $MonthOfDate :<ExpD >

Numeric

Example :Select $ $MonthOfDate :$ $MachineDate from Company Returns the starting date of the specified month.

$$ MonthStart

$ $MonthStart : <ExpD >

Date

Example :Select $ $MonthStart :$ $MachineDate from Company $ $ Round function is used to round-off a value Example :$ $ Round : 125.72 : 0. 10 returns 125.70 $ $ Round function is used to round-off a value Example :$ $ Round : 125.72 : 0. 10 returns 125.70 $ $ Round function is used to round-off a value Example :$ $ Round : 125.72 : 0. 10 returns 125.80 Returns the number of companies currently open in Tally Software. Refer Example at www. rtslink.blogspot .com Returns the Tally Serial Number. Refer example at www. rtslink.blogspot .com Converts numeric expression into string. Example :[Field : My Field] Set as : $$ String:500 Returns the length of the string parameter Example :[Field : My Field] Set as: $ $ StringLength:"Shweta Softwares" Used to extract a sub-string from another string . Example :[Field : My Field] Set as: $ $ StringPart:"Shweta Softwares":7:9

$$ Round

$ $Round : <ExpN > : <RoundLimit >

Numeric

$$ RoundDown

$ $RoundDown : <ExpN> : <RoundLimit >

Numeric

$$ RoundUp

$ $RoundUp : <ExpN> : <RoundLimit >

Numeric

$$ SelectedCmps

$ $SelectedCmps

Numeric

$$ SerialNumber

$ $SerialNumber

String

$$ String

$ $String: < ExpN>

String

$$ StringLength

$ $stringLength: <ExpC>

Numeric

$$ StringPart

$ $StringPart : <expC>: <StartPos>: <Length> String Remarks :This will return "Computers".i.e . beginning at the 8th character , it returns the next 9 characters. Please note that the 1 st character is numbered as 0 . Returns the remaining word from the <ExpC> string after the Index .

$$ StringRemWord

$ $StringRemWord: < Index>: <ExpC>

String

Example :$ $ StringRemWord:2:"Shweta Softwares Gandhidham" This returns the word "Gandhidham". i.e . the word after 2 words as specified by the Index Returns the word specified by the Index . Example :$ $ StringWord:2 :"Shweta Softwares Gandhidham "

This returns the word "Computers". i .e . the 2nd word as specified by the Index $$ SysName $ $SysName : <reserved-string> String Specifies the System -name for the reserved string Returns the value for the System variable SVFROMDATE $$ SystemPeriod From $ $SystemPeriodFrom Date Example :Select $ $SystemPeriodFrom from Company or Select ## SVFROMDATE from Company Returns the value for the System variable SVTODATE $$ SystemPeriodTo $ $SystemPeriodTo Date Example :Select $ $SystemPeriodTo from Company or Select ## SVTODATE from Company Converts the string to upper-case Returns the value of a field /method. Example :[Field : My Field] Use: Name Field Method /Field data type Validate: NOT $ $ IsEmpty:$ $Value In the above code, function $ $ Value is used which returns the value of the field 'My Field '. Refer program TDL34 Returns the Year for the specified Date. $$ YearOfDate $ $YearOfDate : <ExpD > Numeric Example :Select $ $YearOfDate :$$ MachineDate from Company The above returns the year (.i .e 2007) Returns the Year end-date for the Current year (based on the Date passed as parameter) $$ YearEnd $ $YearEnd : <ExprD> Date Example :Select $ $YearEnd :##SVTODATE from Company The above returns the year-end date (ex. in my system it returns 31 -3-2008). $$ ZeroFIll $ $ZeroFill : <ExpC> : <ExpN > String $ $ Zero pads the given string with zeros. Example :$ $ Zero : "525" : 5 returns "00525"

$$ Upper

$ $Upper: < ExpC>

String

$$ Value

$ $Value

You can test check the TDL functions by writing TDL code or by using WRAPPER.EXE provided with RTSlink DLL . STEPS for using WRAPPER.EXE to try out the TDL functions:1) Create a plain text file (say SQL1.TXT) using notepad which contains the following text :-

SELECT

$$Max :100 :15

from Company

2) Save the file in C:\RTSlink folder . 3) Go to DOS prompt and change to C:\RTSlink folder . (It is assumed that you have already downloaded and installed RTSlink DLL) 4) Type the following command:-

Wrapper

<FileName>

/SQL

5) This will generate response in a file named RESPONSE .LOG

Tags: Tally Developer, Tally Definition Language, Tally Customization, Tally 7.2, Tally 9 , Free Tally Training, Download Tally 9 TDL

Tally is a registered trademark of Tally Solutions FZ LLC.