Getting Values from list stored

Discussion in 'Tally Developer' started by Rupal Agarwal, Sep 28, 2021.

    
  1. Rupal Agarwal

    Rupal Agarwal Member


    Hello everyone, I have created 2 menus in tally
    1 to input the value (Alter report) and
    2 to get the output (display report)

    Now I want to make a report like:
    If I enter a list in input report, it will show in output report.

    My code is given below :

    Please guide further.

    Code:
    [#Menu:Gatewayoftally]
        Item:Input:Alter:Input
        Item:Output:Display:Output
    
    [Report:Input]
        Form:Input
     
    [Form:Input]
        Part:title, Input
    ;    Height:100% screen
    ;    Width:100% screen
     
    [Part:title]
        Line:title
     
    [Line:title]
        Field:NameList
        Local:Field:NameList:Info:"List of All Names"
        Local:Field:NameList:Align:Center
        Border:column titles
    
    [Part:Input]
        Line:Input
    ;    Repeat:Input:NameList
        Scroll:Vertical
     
    [Line:Input]
        Field:NameList
     
    [Field:NameList]
        Use:Name Field
        Set as:" "
        Storage:NameList
        Width: 40
    ;    Modifies:NameList:Yes
     
    ;--------------------------------------------------------------------------------------
    
    [Report:Output]
        Form:Output
     
    [Form:Output]
        Part:title, Output
     
    [Part:Output]
        Line:Output
     
    [Line:Output]
        Field:Output
     
    [Field:Output]
        Set as:$NameList
     
    ;-----------------------------------------------------------------------------------------------
    
    [Collection:NameList]
    
    [System:UDF]
    namelist:string:30001
    
    [Variable:NameList]
        Type:String
    
    [System:Variable]
    
     
    Last edited: Oct 2, 2021


  2. Himanshu-2002

    Himanshu-2002 Active Member


    At Input Report level add object

    Example:-
    [Report:Input]
    Object:Company

    Now, To fetch udf.. Do it like this

    Set as:$NameList:Company:$$CurrentCompany
     


  3. Rohit Khedar

    Rohit Khedar Member


    Not working
     


  4. Himanshu-2002

    Himanshu-2002 Active Member


    Please share your updated code
     


  5. Rohit Khedar

    Rohit Khedar Member


    hear only one enterd show but repeat line enterd not show

    [#Menu:Gatewayoftally]
    Item:Input:Alter:Input
    Item:Output:Display:Output

    ;; ===================== Input ======================= ;;

    [Report:Input]
    Form:Input
    Object:Company

    [Form:Input]
    Part:title, Input
    Height:100% screen
    Width:50% screen


    [Part:title] ;; ====================== Part
    Line:title
    [Line:title]

    Field:NameListTit
    Local:Field:NameListTit:Info:"List of All Names"
    Local:Field:NameListTit:Align:Center
    Border:column titles

    [Field:NameListTit]
    Use:Name Field
    Set as:""
    Full Width:Yes



    [Part:Input] ;; ====================== Part
    Line:Input
    Repeat:Input:NameList
    Scroll:Vertical
    BreakOn : $$IsEnd:$NameList

    [Line:Input]
    Field:NameList
    [Field:NameList]
    Use:Name Field
    Set as:" "
    Storage:NameList
    Full Width:Yes
    Modifies:NameList:Yes


    ;; ===================== Output ======================= ;;


    [Report:Output]
    Form:Output
    [Form:Output]
    Part:title, Output
    Height:50% screen
    Width:40% screen


    [Part:Output] ;; ====================== Part
    Line:Output
    [Line:Output]
    Field:Output

    [Field:Output]
    Set as:$NameList:Company:$$CurrentCompany



    [Collection:NameList] ;;================ Collection

    Fetch : NameList


    [System:UDF]
    namelist:string:30001

    [Variable:NameList]
    Type:String

    [System:Variable]
     


  6. Rupal Agarwal

    Rupal Agarwal Member


    How to repeat line in output report ????
     


  7. Rohit Khedar

    Rohit Khedar Member


    All input entry save but not show in output all input entry
     


  8. Himanshu-2002

    Himanshu-2002 Active Member


    I thought you want to store a Single value...you can save multiple values using aggregate udf
    Example

    [Part:Input]
    Repeat:Line Name : AggrUDF

    ....

    [Field:Input]
    Storage:NameList

    ..

    [System:UDF]
    AggrUDF: Aggregate:2000
    NameList: String:2001


    Now, For output create a collection for ouput

    [Collection: Output Coll]
    Type:AggrUDF:Company
    Child of: $$CurrentCompany
    Fetch:Name List


    [Part:Output]
    Repeat: Output Line: Output Coll

    [Field:Output]
    Set as:$NameList
     


  9. Rohit Khedar

    Rohit Khedar Member


    thanks Himanshu ji now good work



     


  10. Himanshu-2002

    Himanshu-2002 Active Member


    Your Welcome Sir
     


  11. Rupal Agarwal

    Rupal Agarwal Member


    still not working:(
     


  12. Himanshu-2002

    Himanshu-2002 Active Member


    Rupak sir share your updated code..
     


  13. Rupal Agarwal

    Rupal Agarwal Member


    [#Menu:Gatewayoftally]
    Item:Input:Alter:Input
    Item:Output:Display:Output
    ;----------------------------------------------------------------------------------------------------
    [Report:Input]
    Form:Input
    ;Object:company

    [Form:Input]
    Part: InputT, Input
    ;------------------------------------------------
    [Part:InputT]
    Line:InputT

    [Line:InputT]
    Field:input
    Local:Field:input:Info:"Input List"
    Local:Field:input:Align:Center
    Border:Column Titles
    ;------------------------------------------------
    [Part:Input]
    Line:Input
    Repeat:input:eek:utput coll
    Scroll:Vertical
    Break On:$$IsEnd:$namelist
    [Line:Input]
    Field:Input

    [Field:Input]
    Use:name field
    Set as:""
    Storage:Namelist
    Width:30
    ;-------------------------------------------------------------------------------------------------------------
    [Report:Output]
    Form: Output

    [Form:Output]
    Part:OutputT,Output
    ;------------------------------------------------
    [Part:OutputT]
    Line:OutputT

    [Line:OutputT]
    Field:Output
    Local:Field:Output:Info:"Output List"
    Local:Field:eek:utput:Align:Center
    Border:column titles
    ;------------------------------------------------
    [Part:Output]
    Line:Output
    Repeat:eek:utput : Output Coll
    Scroll:Vertical
    Break On:$$IsEnd:$namelist

    [Line:Output]
    Field:Output

    [Field:Output]
    Use:name field
    Set as:$namelist
    Width:40

    ;-------------------------------------------------------------------------------------------------------------------------------
    [System:UDF]
    AggrUDF: Aggregate:2000
    NameList: String:2001
    ;Now, For output create a collection for ouput
    [Collection: Output Coll]
    Type:AggrUDF:Company
    Child of: $$CurrentCompany
    Fetch:Name List
     


  14. Himanshu-2002

    Himanshu-2002 Active Member


    Corrections:
    1. Add Object: Company at Input Report Level
    2.At Input Part Level, Add Repeat:Input:AggrUDF
    3.Remove Set as from input Field
    4.Remove Break On From Output Part
     


  15. Himanshu-2002

    Himanshu-2002 Active Member


    Sir Can I ask If you guys are learning TDL From a Course ?.. Because It looks like an assignment
     


  16. Rupal Agarwal

    Rupal Agarwal Member


    No buddy its not an assignment. I am doing it to understand a report like how this works in tally to create a list and use it.

    Problems occuring:

    1. When i m using object:company it is removing the title of input report.
    2. There is no collection of aggrUDF, so what it will repeat.
    3. If I remove set as form input field where i will enter the text of feed.
    4. Done.
     


  17. Rupal Agarwal

    Rupal Agarwal Member



    I want this buddy.
    And if possible, can u provide the full working code, so I can understand it ?
     


  18. Himanshu-2002

    Himanshu-2002 Active Member


    Sir Just follow the blindly once... If It works you will understand everything automatically
     


Share This Page