;;================================================================================= ;; Name Set Sample /* Objective(s) - - The objective of this program is to demonstrate the usage of Name Set with a collection as Data Source Syntax - [Name Set: ] List : : [Collection : ] Data Source : Name Set : */ [#Menu : Gateway of Tally] Add: Item : "Name Set" : Display : TSPL Name SetCollection [Report: TSPL Name SetCollection] Form : TSPL RepeatNameSet [Form: TSPL RepeatNameSet] Part : TSPL RepeatNameSet Horizontal Align : Center [Part: TSPL RepeatNameSet] Line : TSPL RepeatNameSet Title, TSPL RepeatNameSet, TSPL ReturnNameSetValue Repeat : TSPL RepeatNameSet : TSPLNameSetCollection Scroll : Vertical [Line: TSPL RepeatNameSet Title] Field : TSPL RepeatNameSet Name, TSPL RepeatNameSet Value Border : Column Titles Local : Field : TSPL RepeatNameSet Name : Info : "Name" Local : Field : TSPL RepeatNameSet Value : Info : "Value" [Line: TSPL RepeatNameSet] Field : TSPL RepeatNameSet Name, TSPL RepeatNameSet Value [Field : TSPL RepeatNameSet Name] Use : Name Field Set as : $Name [Field : TSPL RepeatNameSet Value] Use : Name Field Set as : $Value [Line : TSPL ReturnNameSetValue] Field : TSPL ReturnNameSetValue Space Top: 6 mms [Field : TSPL ReturnNameSetValue] Use : Name Field Set as : "Return Name Set Value using Function : " + $$NameGetValue:E2:TSPLAnnexureErrorStrings Full Width : Yes ;;name set definition [Nameset : TSPLAnnexureErrorStrings] List Name : E1 : "PAN Number Invalid" List Name : E2 : "Lorry Number Missing" List Name : E3 : "Commodity Code is Empty" ;; This will print "Lorry Number Missing" [Collection: TSPLNameSetCollection] Data Source : Name Set : TSPLAnnexureErrorStrings Format : $Name, 10 Format : $Value, 20 ;; End of file