create group via function

Discussion in 'Tally Developer' started by bakaa99, Mar 4, 2019.

    
Tags:
  1. bakaa99

    bakaa99 New Member


    i am trying to create a parent group on press of create group menu item and want to add all those created under that parent group

    Like :

    User Clicks on "Create Group",
    then Create Group "Parent" (in the background)
    then user created a group "child" ,
    then that "child" group should be created under the "parent" group.

    Parent>>Child

    I know we can use the function create object to create group , but i can't seem to make it work. Some kind of Hint or sample will be very helpful .Thx
     
    Last edited: Mar 4, 2019


  2. NIRMALGHORAWATIN

    NIRMALGHORAWATIN New Member


    Try

    Code:
    [Function: CreateGroups]
       
        Variable: MyNewGroup    : String
        010: Set: MyNewGroup    : $$String:"Financial Expenses"
        030: IF:$$IsEmpty:$Name:Group:##MyNewGroup   
        040: New Object: Group: ##MyNewGroup: True
        050: Set Value: Name: ##MyNewGroup   
        060: Set Value: Parent: "Indirect Expenses"
        070: Create Target
        080: Msg Box: "Automation Module": "Financial Expenses Group created under Parent Indirect Expenses"
        090: Else
        100: Msg Box: "Automation Module": "Financial Expenses Group already exists"
        110: End If
     


Share This Page