Goal : To find Over due amount of a ledger I tried writing TDL function and then call using <Envelope> ... .. <Type>Function</Type> <ID>MyOverDueFunction<> </Envelope> Method. It Didnot work say 'No Such Function" Is it possible to write a funtion like <TDL> <TDLMESSAGE> <Function Name="MyOverDueFunction" > Parameter : ldgName : string Returns : Number variable : odAmt : number 001 : SET : odAmt : 0 002 : WALK COLLECTION : MyCollection 003 : SET : odAmt : ##odAmt t + $$Number:$Amount 004 : END WALK 005 : RETURN : ##odAmt </Function> <Collection Name="MyCollection"> Type: Bills Child of : #ldgName Filter : DueBillsFilter </Collection> <TDLMESSAGE> <TDL>