how fetch rate from a collection

Discussion in 'Requests' started by vaibhav jindal, Apr 16, 2019.

         

  1. a.png a.png b.png
    Code:
    [System: UDF]
    mydbPriceList : Aggregate: 2700
    PriceListName : String : 2701 ;: Yes
    PriceListRte : Amount: 2702
    [Collection : PriceListNameCollection]
    Type : mydbPriceList : Company
    Childof : ##SVCurrentCompany
    Format : $PriceListName, 10
    Title : Price List
    Code:
    [Field: ItemNameofList1]
    Use : Amout Field
    Set as: ""
     


  2. sattam

    sattam Active Member


    [Field: ItemNameofList1]
    Use : Amount Field
    Set as:$PriceListRte
     



  3. It's not working,
     



  4. Amit ji pls help me in this case
     


  5. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    [Collection : PriceListNameCollection]
    Compute : PriceListRte : $PriceListRte

    [Field: ItemNameofList1]
    Use : Amount Field
    Set as:$PriceListRte
     



  6. its not working sir
    i wants if i select item1 then its auto select rate 279.50
    if i select item2 then its auto select rate 155.50
     


  7. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Do you ask Doctor to prescribe medicines on phone call, without checking your BP, pulse, blood report etc or any physical examinations.......

    Same logic...from what you submitted... you get your answer........... limited code...limited answer....... Also quite possible, problem is coming from elsewhere...from other part of codes.

    Actually in such cases, our time is also wasted............
     
    sattam likes this.




  8. sir i am not here for waste time of anyone,
    i have learned a lot from this forum,
    i have found soloution for this which is "Set as:$$Table:ItemNameofList:$PriceListRte"
    and my full code is
    Code:
    [#Menu: Gateway Of Tally]
    
    Add : Item : Price List Master : Alter : Price List
    
    
    
    [Report: Price List]
    Form : Price List
    Object : Company
    
    [Form: Price List]
    Part : FormSubTitle, PriceListPart
    FullWidth : No
    Height : 90% Screen
    Background : @@SV_CHEQUE
    SpaceRight : 0.5
    SpaceLeft : 1.5
    Local : Field : Form SubTitle : Info : $$LocaleString:"Price List"
    Option : Small Size Form
    
    
    [Part: PriceListPart]
    Lines : CMP Price List
    Repeat : CMP Price List:mydbPriceL
    Break on: $$IsEmpty:$PriceListName
    Scroll : Vertical
    Height : 90% Screen
    
    [Line: CMP Price List]
    Fields : Multi SNo, CMPItemName,CMPItemRate
    Local : Field : Default : Delete : Border
    
    [Field: CMPItemName]
    Use : Short Name Field
    Storage : PriceListName
    Unique : Yes
    
    
    [Field: CMPItemRate]
    Use : Amount Field
    Storage : PriceListRte
    
    [System: UDF]
    mydbPriceL : Aggregate: 2754
    PriceListName : String : 2701 ;: Yes
    PriceListRte : Amount: 2702
    
    
    
    [Collection : PriceListNameCollection]
    Type : mydbPriceL : Company
    Childof : ##SVCurrentCompany
    Format : $PriceListName, 10
    Title : Price List
    
    
    
    ;=============== During Sales Voucher Entry=============
    [#Field : VCHACC StockItem]
        Add : SubForm :  PriceListSubReport
        [report :  PriceListSubReport]
    form :  PriceListSubform
    
    
    [Form: PriceListSubform]
    Part : PriceListPart1
    Width : 25% Page
    Height : 60% Page
    Vertical Align : Centre
    [Part: PriceListPart1]
       
    Line :  PriceListLineOne
    
    
    [Line: PriceListLineOne]
    Field : ItemNameofList,ItemNameofList1
    
    [Field: ItemNameofList]
    Use : Name Field
    Storage : ItemListName
    Table : PriceListNameCollection
    Show Table: Always
    
    
    [Field: ItemNameofList1]
    Use : Amount Field
    Set as:$$Table:ItemNameofList:$PriceListRte
    Storage : ItemListVchRate
    Width: 12
    
    [System: UDF]
    ItemListName:String:875
    ItemListVchRate:Amount:987
    [#Field: VCH NrmlRate]
        ResetVal    :If $$IsEmpty:@@mmmmvvvv Then $$Value else @@mmmmvvvv
       
    
    [System: Formula]
        mmmmvvvv : $$Table:ItemNameofList:$PriceListRte
     



  9. aaaaa.png

    and many time this gave error "Collection : mydbPriceL" not found
     


  10. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    What I said was.... Actually in such cases, our time is also wasted............ Nowhere I said you wasted our time.

    My point being.....and that is a fact..... when we get problems from members, with half information, half measure solutions are derived and given, and later on it is found that the problem originated from other part of the code, which was not yet submitted.

    Other point being.... for proper understanding of developer's ideas, codes etc, it is essential we get proper explanations, screenshots etc and full information so that it can be studied and solutions given properly.

    Developers and Learners are always encouraged to ask queries ............but with full and proper information.......... so the experts grasp the idea of what exactly one is trying to achieve through the code.
     



  11. ok sir i have not any problem , i accept your concern and my fault......
    so pls solve my this problem, in have no idea how to set this
     




  12. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    As I asked earlier..... please send me your dummy data.....as per your company setting/features.

    Not working well on my sample company due to different settings.
     



  13. here is dummy data
     

    Attached Files:



  14. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Working code........

    Code:
    [#Menu: Gateway Of Tally]
    Add : Item : Price List Master : Alter : Price List
    
    [Report: Price List]
    Form : Price List
    Object : Company
    
    [Form: Price List]
    Part : FormSubTitle, PriceListPart
    FullWidth : No
    Height : 90% Screen
    Background : @@SV_CHEQUE
    SpaceRight : 0.5
    SpaceLeft : 1.5
    Local : Field : Form SubTitle : Info : $$LocaleString:"Price List"
    Option : Small Size Form
    
    [Part: PriceListPart]
    Lines : CMP Price List
    Repeat : CMP Price List:mydbPriceL
    Break on: $$IsEmpty:$PriceListName
    Scroll : Vertical
    Height : 90% Screen
    
    [Line: CMP Price List]
    Fields : Multi SNo, CMPItemName,CMPItemRate
    Local : Field : Default : Delete : Border
    
    [Field: CMPItemName]
    Use : Short Name Field
    Storage : PriceListName
    Unique : Yes
    
    
    [Field: CMPItemRate]
    Use : Amount Field
    Storage : PriceListRte
    
    [System: UDF]
    mydbPriceL : Aggregate: 2754
    PriceListName : String : 2701 ;: Yes
    PriceListRte : Amount: 2702
    
    [Collection : PriceListNameCollection]
    Type : mydbPriceL : Company
    Childof : ##SVCurrentCompany
    Format : $PriceListName, 10
    Format : $PriceListRte, 10
    Title : Price List
    
    
    ;=============== During Sales Voucher Entry=============
    
    [#Line: EI InvInfo]
        Add     : Field        : After    : VCH StockItem  : ItemNameofList, ItemNameofList1
    
    [Line: PriceListLineOne]
    Field : ItemNameofList, ItemNameofList1
    
    [Field: ItemNameofList]
    Use : Name Field
    Storage : ItemListName
    Table : PriceListNameCollection
    Show Table: Always
    
    
    [Field: ItemNameofList1]
    Use : Amount Field
    Set as:$$Table:ItemNameofList:$PriceListRte
    Set Always : Yes
    Storage : ItemListVchRate
    Width: 12
    Invisible : Yes
    
    [System: UDF]
    ItemListName:String:875
    ItemListVchRate:Amount:987
    
    [#Field: VCH NrmlRate]
            Set as          : If #ItemNameofList1 != 0 Then $ItemListVchRate Else If (@TaxationEnabled AND (@@InvoiceInCreate OR NOT $$IsEmpty:$InclusiveTaxValue) AND (@@STKInclTax OR ##ICFGInclTax) AND @@SalesInvoiceMode) AND NOT (@HasBatchAllocation OR $$IsEmpty:$$Number:$InclusiveTaxValue OR (($Amount != 0) AND ($Amount != @@CalcedAmt))) Then $$InclusiveTaxValue:@@ExItemRate:@@STItemRate:@@VATItemRate:@@TCSItemRate:@@GSTItemRate:@@GSTItemQtyRate:@@ExItemMRPDutyValue:@@VATItemMRPDutyValue:@@ExItemQuantum Else +
                              If #VCHBilledQty = 0 OR  #VCHBilledQty != 0 then @Setval else @Setval
     
    
     



  15. aaa.png


    Sir you done great effrets , but this error comes again , many times its works niclely, many times i got this error
     


  16. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Well I am not getting the error.......... so I would not be able to find a solution.

    Please note down the 4-5 steps before you get this error.... maybe something is triggering it.

    Also from above screenshot, it seems you have other TDLs too and maybe they are clashing someway .... when a certain event or keystroke is activated.

    Once you note down the STEPS leading to that error.... then do the following.........
    remove all other TDLs....
    Load TDL # 1...then again follow the steps that led to the error message generation. If no error.... then load TDL # 2 ....and so on.......
     


  17. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    or simple way you can try first.... rename myDBpriceL to something else first..........

    Also quite possible, since you are altering the Tally's default field.......... so shit happens. Tally is known to be cranky............. I've faced similar problems before........
     



  18. Thanks a lot sir
     


Share This Page