Data Not refreshing

Discussion in 'Tally Developer' started by murtuza shakir, Aug 24, 2018.

    

  1. Dear Experts

    In sales & purchase voucher I have added a part after narration to show basic item details ,like cost price ,stock available n last selling price

    the issue is when we select the second item the information in the part is not refreshing ,that is it still shows the values of the first item

    kindly suggest the method

    regards
     


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    show screenshot...........

    If item1 CP-100Rs --- Stock -120Nos ---Last SP-140Rs.
    If item2 CP-200Rs --- Stock -100Nos ---Last SP-240Rs.

    You want both items to be displayed?? or summation of both items?
     



  3. Dear
    thanks for the reply

    here is the screen shots
     

    Attached Files:

    • sc1.jpg
      sc1.jpg
      File size:
      311.8 KB
      Views:
      54
    • sc2.jpg
      sc2.jpg
      File size:
      325.8 KB
      Views:
      49


  4. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    you should put your FIELDS inside the PART level of each stock Item you select..................

    So every item u select in the Sales Invoice.......it will show you the details just below where your "No. of packages"
     


  5. sivam

    sivam Active Member


    Hi Shakir,
    You Just use "Set Always : Yes" In Field Level.
     
    vinoth likes this.



  6. dear thanks for your valuable reply its still not refreshing
     


  7. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    send your code in messaging.......
     


  8. sivam

    sivam Active Member


    Send your Field Level code
     



  9. [Line: storeDetails]
    Left Fields : Simple Prompt,rtcnamefld
    Right Fields: Short Prompt ,Rate Price Field,Medium Prompt, Qty Field
    Local : Field : Simple Prompt : Set as : "Total Stock available"
    Local : Field : rtcnamefld : Set as : $name:StockItem.vStockItemName
    Local : Field : rtcnamefld : Set Always : Yes
    Local : Field : Medium Prompt : Set as : "Last selling Price"
    Local : Field : Qty Field : Set as : $ClosingBalance:StockItem:$StockItemName
    Local : Field : Qty Field : Set Always : Yes
    Local : Field : Short Prompt : Set as : "Cost Price"
    Local : Field : Rate Price Field : Set as : $StandardCost:StockItem:$StockItemName
    Local : Field : Rate Price Field : Set Always : Yes
    Local : Field : Default : Skip : Yes


    kindly look into
     


  10. RAJdon

    RAJdon New Member


    The Above code will show only the First Line Value Only....


    With Current Line Variable to show each line value
     



  11. yes that is the issue

    if you can guide or hint or and example that will be a great help
     


  12. sivam

    sivam Active Member


    Set Values Like This

    Set as : $ClosingBalance:StockItem:($InventoryEntries[($$NumItems:InventoryEntries)].StockItemName)
     
    vinoth likes this.



  13. Dear Sir
    Thank your for your reply , it still not refreshing

    could you please explain me the logic to understand the above code
     


  14. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    $ClosingBalance:StockItem:$StockItemName............ is original if u want to find a stockitem name.........

    $InventoryEntries[($$NumItems:InventoryEntries)].... in place of $StockItem name.....so as to point out the next stockitem name...........as per $$NumItems

    so full code is ........
    $ClosingBalance:StockItem:($InventoryEntries[($$NumItems:InventoryEntries)].StockItemName)
     
    Jaydeep Shah likes this.



  15. sir
    thank you for your explanation

    but we not getting the result it shows the first value only
     


  16. sivam

    sivam Active Member


    Try like this

    Code:
    [Line: storeDetails]
    
        Left Fields : Simple Prompt, rtcnamefld
    
    [Field: rtcnamefld]
       
        Use            : Name Field
        Type        : String    : Forced
        Set as        : @L2
        L1            : $$NumItems:InventoryEntries
        L2            : $$CollectionField:$StockItemName:@L1:InventoryEntries
        Set Always    : Yes
     
    vinoth likes this.



  17. sir thank you very much for reply its refreshing now but only name when i change to closing balance it doesn't show

    Code:
    [Field: rtcnamefld]
            Use            : Qty Field
            Type        : Quantity    : Forced
            Set as        : @L2
            L1            : $$NumItems:InventoryEntries
            L2            : $$CollectionField:$ClosingBalance:@L1:InventoryEntries
            Set Always    : Yes
     


  18. sivam

    sivam Active Member


    Don't Use Default Field. Just Declare your own field.
     
    vinoth likes this.



  19. sir tried

    it only shows stock item name not any other details like closing balance & standard cost

    regards
     


  20. sivam

    sivam Active Member


    [Field: rtcnamefld]
    Use : Qty Field
    Type : Quantity : Forced
    Set as : @L3
    L1 : $$NumItems:InventoryEntries
    L2 : $$CollectionField:$StockItemName:mad:L1:InventoryEntries
    L3 : $ClosingBalance:StockItem:mad:L2
    Set Always : Yes
     
    vinoth, Jaya, Nallasivam and 3 others like this.



  21. sir
    thank you so much it work perfectly

    sir what is the use of function $$CollectionField
    how does this function help us can u plz explain the logic
     


  22. sivam

    sivam Active Member


    Function - $$CollectionField
    This is used to get the value of a specified expression as applied on the nth Object of a Collection.

    Syntax

    $$CollectionField:<ValueExpression>:<PositionNumber>:<CollectionName>
    Where,
    <CollectionName> is the name of a collection.
    <ValueExpression> is any valid expression to be evaluated on the element at position
    <PositionNumber> in the collection.

    Example:
    $$CollectionField : $Amount : 1 : AllLedgerEntries
    It returns the first value of the Method Amount from AllLedgerEntries Object.
     
    vinoth and Nallasivam like this.


Share This Page