;;Fetch Object Attribute /* ;;Explanation - This example demonstrates the use of the Fetch Object attribute at the function level. ;;Syntax [Function : ] Fetch Object : : : */ ;;=== Function Definition executing Fetch Object - Stock Item [Collection: TSPL Smp StockItem] ;; Collection of Stock Items Type : Stock Item [Collection: TSPL StockItem Coll] Source Collection : TSPL Smp StockItem By : SICStockItem : $Name By : SICStockGroup : $Parent By : SICStockUOM : $BaseUnits [Function: TSPL FetchObjectFunction] 100 : Walk Collection : TSPL StockItem Coll 200 : Call : TSPL Smp Fetch Objects ;;Function executing fetch object attribute. 300 : End Walk [Function: TSPL Smp Fetch Objects] Fetch Object: Stock Item : $SICStockItem : $Name ;;Using the Fetch Object attribute, the Stock Item Name is retrieved during function execution. 00 : LOG : "Objects fetched for Item - " + $SICStockItem ;;=== Button Definition call the function [Button : TSPL ActionButton] Title : "Click here" Action : Call : TSPL FetchObjectFunction Key : Alt + R ;;=== Report to demonstrate the working of 'Action' attribute in Function definition using Button 'TSPL ActionButton' [#Menu: Gateway of Tally] Add : Item : "Fetch Object Attribute" : Display : TSPL ActionAttribute [Report: TSPL ActionAttribute] Form : TSPL ActionAttribute [Form: TSPL ActionAttribute] Part : TSPL ActionAttribute Button : TSPL ActionButton [Part: TSPL ActionAttribute] Line : TSPL ActionAttribute Border : Thin Box [Line: TSPL ActionAttribute] Field : TSPL ActionAttribute Border : Thin Box [Field: TSPL ActionAttribute] Use : Name Field Set as : "On button 'Alt + R' click, the Fetch Object attribute in the function 'TSPL Smp Fetch Objects' is executed, and the Stock Item Name is retrieved during the function execution." Style : Normal Bold Full Width : Yes Lines : 0 ;;End of File