;; Sri Ganeshji : Sri Balaji : Sri Pitreshwarji : Sri Durgaji : Sri Venkateshwara /* - This program illustrates the use of following attributes of Line Access Name Add Replace Delete Invisible Local formula No Cursor Set About Program - This program takes menu choices for the party ledgers - The 3 menu choices are taken in repeated fields and the line has access name defined - on form accept The values of fields in each field is accessed with the access name of line via function $$AccessObj and logged in calculator panel. */ [#Menu: Gateway of Tally] Add: Item: ($$LocaleString:"Menu Choice Registration"): Alter: TSPL Menu Choice Rep [Report: TSPL Menu Choice Rep] Form : TSPL Menu Choice Rep Title : ($$LocaleString:"Menu Choice Registration") Object : Company : ##SvCurrentCompany [Form: TSPL Menu Choice Rep] Parts : TSPL Menu Choice Rep Width : 100% Screen Height : 100% Screen ;;Enabling Export and print of current report from top menu Local: Menu: Export TopMenu : Replace: Key Item : @@locCurrentReport : @@locCurrentReport : R : Export Report : (.) Local: Menu: Print TopMenu : Replace: Key Item : @@locCurrentReport : @@locCurrentReport : R : Print Report : (.) ;; On form accept, the values entered in the details line is accessed using the accessname in $$accessObj in the function On: Form Accept: Yes: Call: TSPL Menu Choice Log [Part: TSPL Menu Choice Rep] Lines : TSPL Menu Choice Title, TSPL Menu Choice Details Repeat : TSPL Menu Choice Details: TSPLPartyLedColl Break On : $$IsEmpty:#TSPLCustomerName Scroll : Vertical CommonBorder: Yes [Line: TSPL Menu Choice Title] Use : TSPL Menu Choice Details Local : Field : Default : Type : String Local : Field : Default : Align : Center Local : Field : TSPL Customer Name : Set as : $$LocaleString:"Customer" Local : Field : TSPL Customer Name : Widespaced: Yes Local : Field : TSPL Menu Choice : Delete : Storage Local : Field : TSPL Menu Choice : Info : ($$LocaleString:"Menu Choice ")+($$String:$$Column) ;; Border is added, Fields are replaced and access name is deleted and then remaining attributes of used line is applied Add : Border : Thin Top Bottom Replace : Fields : TSPL Customer Name, TSPL Menu Choice, TSPL Menu : TSPL Customer Name, TSPL Menu Choice Delete : Access Name ;; This line is invisible in Export and print Mode Invisible: @InvisibleCond ;; Local Formula used in the Invisible condition InvisibleCond: $$InExportMode OR $$InPrintMode [Line: TSPL Menu Choice Details] Fields : TSPL Customer Name, TSPL Menu Choice, TSPL Menu Repeat : TSPL Menu Choice Set : 3 ;; Cursor is not shown in the line No Cursor : Yes ;; Each line repetition has unique access name set which is combination of "Line" and the Line Number Access Name : ("Line" + ($$String:$$Line)) [Field: TSPL Customer Name] Use : Name Field Set as : $Name Skip : Yes [Field: TSPL Menu Choice] Use : Name Field Table : TSPL Menu Coll, Not Applicable Show Table : Always ;; If Not applicable is selected in previous field, the current field is skipped Skip : $$IsNotApplicable:$$PrevFld ;; This is an invisible field that holds concatenation of all the menu choices using $$PrevFld [Field: TSPL Menu] Use : NameField Set Always : Yes Set as : $$PrevFld:1 + ","+ $$PrevFld:2 + "," +$$PrevFld:3 Invisible : Yes ;; Used as Table to show the menu choices [Collection: TSPL Menu Coll] Title : $$LocaleString:"Menu Items" List Name: $$LocaleString:"Dosa", $$LocaleString:"Idli", $$LocaleString:"Fried Rice", $$LocaleString:"Burger" List Name: $$LocaleString:"Pizza", $$LocaleString:"Noodles" ;; On form accept, the values entered in the details line is accessed using the accessname in $$accessObj in the function [Function: TSPL Menu Choice Log] Variable : vCounter : Number : 1 Local Formula : lfToLoc : ("Line" + $$String:##vCounter) Local Formula : lfToLocCustomer : $$AccessObj:Line:@lfToLoc:#TSPLCustomerName Local Formula : lfToLocMenu : $$AccessObj:Line:@lfToLoc:#TSPLMenu 010 : While : (NOT $$IsEmpty:@lfToLocCustomer) 020 : Log: @lfToLocCustomer 030 : Log: @lfToLocMenu 040 : Incr : vCounter 050 : End While ;; Line is repeated over this collection of party ledgers [Collection: TSPLPartyLedColl] Type : Ledger Filter : TSPLCustomerFilter ;; used as filter in the collection [System: Formula] TSPLCustomerFilter: $$IsLedOfGrp:$Name:$$GroupSundryCreditors OR $$IsLedOfGrp:$Name:$$GroupSundryDebtors ;;End Of File