This post illustrates how to use the
$$CollectionField Tally Internal Function.
Download program
TDL30;; PRODUCT: TDL30.TXT ;; PRODUCT-ID: br535cfa-1r7f-3h7a-31h3-a5r55a994e6w ;; AUTHOR: Shweta Computers ;;=========================================================================
;;Add a new menu-item to the Gateway of Tally [#Menu: Gateway of Tally] Item: CollectionField Example: Display: My Report
[Report: My Report] Form : My Form
[Form: My Form] Part: My Part Full Width: Yes Full Height: Yes
[Part: My Part] Line: My Line Repeat : My Line: My Collection Scroll: Vertical Common Border: Yes
[Line: My Line] Left Fields: Myfld1,MyFld2,MyFld3,MyFld4
[Field: Myfld1] ;;TYPE attribute specifies the data-type of the field Type: Date Set as : $Date
[Field: Myfld2] ;;The USE keyword inherits the functionality/properties of the specified object Use : Short Name Field Set as : $VoucherTypeName
[Field: Myfld3] Use : Name Field Set as : $$CollectionField:$LedgerName:1:AllLedgerEntries
[Field: Myfld4] Use : Amount Field Set as : $Amount
;;Collection definition [Collection: My Collection] Type: Voucher |
;; Notes:-
1)
$$CollectionField is a Tally Internal Function. It returns the Method/Field
data of the specified Collection as applied on the "nth" object of the
Collection. In the above code, it fetches the 1st
LedgerName from the
Collection "AllLedgerEntries".
Syntax: $$CollectionField: <Method/Field> : <PositionNumber> : <Collection>
Return Value: Method/Field value as specified as the 1st argument
2)
AllLedgerEntries is a pre-defined Collection that contains Ledger details
for the VOUCHER object. $LedgerName is a method/Field of this collection.
3)
Date,VoucherTypeName,VoucherNumber,Amount are methods/fields of
VOUCHER object.