banner banner Skip to main content

Action - SET TARGET

This action sets the target object with the Object Specification. If no object specification is given,
then the current object will be set as the target object.
Syntax
SET TARGET:
Where,

Example:
01 : SET TARGET : Group
This sets the ‘Group’ Object as the Target Object. Later, by using other methods of this, the target
object can be set and saved to the Tally DB.
4.2.5 Usage of Object manipulation Actions:
Duplicating all payment Vouchers
[Function : DuplicatePaymentVouchers]
;;Process for each Payment Voucher
01 : WALK COLLECTION : My Vouchers
;; Create new Voucher Object as Target Object
02 : NEW OBJECT : Voucher
;;For New Object, set methods from the First Object of the Walk Collection, i.e., from the Current Object
03 : SET VALUE : Date : $Date
04 : SET VALUE : VoucherTypeName : $VoucherTypeName
05 : S ET VALUE : Narration : $Narration + " Duplicated"
;; Walk over Ledger Entries of the current Object
05a: WALK COLLECTION : LedgerEntries
;;Insert Collection Object to the Target Object and make it the present Target Object
06 : INSERT COLLECTION OBJECT : Ledger Entries
;;Set the Values of the Target Object’s Method from Current Objects Methods
07 : SET VALUE : Ledger Name : $LedgerName
258
08 : SET VALUE : IsDeemedPositive : $IsDeemedPositive
09 : SET VALUE : Amount : $Amount
;;Set the Voucher Object as Target, (which is 1 level up in the hierarchy) as Voucher is already having
;;Object specification
10 : SET TARGET : ..
11 : END WALK
;;Save the Duplicated Voucher to the DB.
15 : CREATE TARGET
16 : ENDWALK
17 : RETURN

Popular posts from this blog

Tally ODBC Driver Issue

Based on the Operating System bit (32/64) Tally has given the Exe. However the Micro Soft Excel application should be compatible to O/S and Tally.ERP9. Please note, On 64 Bit OS and 64Bit Tally.ERP9, a 32 Bit Excel application can act as a server with following steps. Please download from the Portal- ‘Microsoft Access Database Engine 2010 Redistributable’.  1. Install AccessDatabaseEngine_x64.exe Installed (steps given below separately.) 2. Excel 32 Bit (Excel 2003) Installed – and acting as server 3. Tally 64 Bit As Client –                      with ODBC Driver [ODBC: "Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:Tally.ERP 9 4.5 Build 7Sample Data.xls;"] and  Tally 32 Bit as Client – with ODBC Driver [ODBC : "Driver={Microsoft Excel Driver *.xls)};DBQ=Sample Data.xls"] This will resolve the problem by NOT upgrading MS Office to 64 bit. you can continue using 32 bit application of Excel.

LOG In function

During expression evaluation, intermediated values of the expression can be passed to calculator window and a log file ‘tdlfunc.log’ inside the application directory. This is very much helpful for debugging the expression. By default, logging is enabled inside the function. Syntax LOG : < Expression> Where, is the expression whose value needs to be passed to the calculator window. [Function : GetCurrentUserApprovelAmt] Parameter : PsvCurrentUser : String Variable : ApprovelAMT : Amount Return : Amount  10 : Walk Collection : ApprovelRequredColl  11 : If : $CustVAUser =  ##PsvCurrentUser  12 : Set : ApprovelAMT : $ApprovelAmount  12A : Log : ##ApprovelAMT  13 : End If  14 : End Walk  15 : Return : ##ApprovelAMT

Differences between Applications and DLLs

Differences between Applications and DLLs Even though DLLs and applications are both executable program modules, they differ in several ways. To the end user, the most obvious difference is that DLLs are not programs that can be directly executed. From the system's point of view, there are two fundamental differences between applications and DLLs: An application can have multiple instances of itself running in the system simultaneously, whereas a DLL can have only one instance. An application can own things such as a Stack, Global memory, File handles, and a message queue, but a DLL cannot.