Dear Experts, what is the methodname of an Item's ($stockitemname) Primary Group . I need to get the Primary Group name in the Invoice. Rgds, Arun
Dear Arun, Kindly check as per bellow code. [#Field : EXPINV Desc] Set as : $Parent:StockItem:$StockItemName + " " + @abc abc : If @@InvWithPartNo And (@@UseNamePartNo OR @@UsePartNoName) Then $StockItemName Else If NOT $$IsSysName:$StockItemName then @@InvItemName else "" Regards, Ritesh
Code: [#Menu : gateway of Tally] Add : Item : Item Parent : Execute : Item Parent [Report : Item Parent] Form : Item Parent [Form : Item Parent] Part : Item Parent [Part : Item Parent] Line : Item Parent [Line : Item Parent] Field : Item Parent Name, Item Parent,Name FIeld Local : Field : Name FIeld : Read Only : Yes [Field : Item Parent Name] Use : Name Field Table : List of Stock Items [Field : Item Parent] Use : Name Field Set Always : Yes Skip : Yes Set As : If Not $$IsEmpty:#ItemParentName Then $$ItemParent:($Parent:StockItem:#ItemParentName) Else "" [Function : Item Parent] Parameter : ItemParent : String Variable : IsPrimaryParent : Logical : Yes Variable : ItemGrandParent : String 001 : While : ##IsPrimaryParent 002 : If : (##ItemParent = $$SysName:Primary OR $Parent:StockGroup:##ItemParent = $$SysName:Primary) 003 : Set : ItemGrandParent : ##ItemParent 004 : Set : IsPrimaryParent : No 005 : Else 006 : Set : ItemGrandParent : ($Parent:StockGroup:##ItemParent) 007 : Set : ItemParent : ##ItemGrandParent 008 : Set : IsPrimaryParent : Yes 009 : End If 010 : End While 011 : Return : ##ItemGrandParent Call the function Item Parent by supplying the Parent Name of Stock Item from any level or any object..