help needed for avoiding duplicate names in tables

Discussion in 'Free Source Codes' started by panam, May 31, 2021.

    
  1. panam

    panam Member


    dear sir,
    help needed for avoiding duplicate names in " list of stock items" tables.
    and also need "%" symbol for gst rate.


    [#collection:VCH Stock item Extract]

    Delete:format
    Add : SubTitle : $$LocaleString:"STOCK ITEM NAME"," CLOSING BALANCE", "GST RATE"
    add:format:$NAME,20
    add:format:$VchStkItmBalance : "Base"
    ADD:format:$GSTIGSTRATE,10
     

    Attached Files:



  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    What duplicate names? Any Tables/Collection will not have a duplicate name. You can try creating any master object with same name, it will not work.

    As for %age...

    ADD:format : @@percentRate,10

    [System : Formula]
    percentRate : $$String:$GSTIGSTRATE + $$String:"%"
     
    panam likes this.


  3. panam

    panam Member


    thank u very much sir for instant reply and help.
     


  4. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    If above does not work then try this way........

    percentRate : $$Sprintf:"%s%s":$GSTIGSTRATE:"%"
     


  5. panam

    panam Member


    Dear sir,
    in this code how to fetch gst rate.

    [*Collection: Vch Stock Item Extract]
    Use : ExtractAlias Collection
    Source Collection : Stock Item Src
    Collection : StockItem PartNo With Closing
    Title : $$LocaleString:"List of Items"
    Fetch : Name,parent, VchStkItmBalance
    Set as : $FirstName
    Keep Source : ()...
    Client Only : No
    Add : SubTitle : $$LocaleString:"STOCK ITEM NAME"," CLOSING QTY ", "GST RATE"
    Format : $NAME,20
    Format : $VchStkItmBalance : "Base"
    Format : $GSTIGSTRATE,10
     


  6. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Where exactly are you trying to access this??
     


  7. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Why you using * ????

    [#Collection: Vch Stock Item Extract]
     
    panam likes this.


  8. panam

    panam Member


    [#Collection: Vch Stock Item Extract]
    Use : ExtractAlias Collection
    Source Collection : Stock Item Src
    Collection : StockItem PartNo With Closing
    Title : $$LocaleString:"List of Items"
    Fetch : Name,parent, VchStkItmBalance
    Set as : $FirstName
    Keep Source : ()...
    Client Only : No
    Add : SubTitle : $$LocaleString:"STOCK ITEM NAME"," CLOSING QTY ", "GST RATE"
    Format : $NAME,20
    Format : $VchStkItmBalance : "Base"
    Format : $GSTIGSTRATE,10

    sir, in this above QUERY1.jpg code stock item name and closing balance is not duplicating in table.
    but in below code stock item name and closing balance is duplicating in table.
    [#collection:VCH Stock item Extract]

    Delete:format
    Add : SubTitle : $$LocaleString:"STOCK ITEM NAME"," CLOSING BALANCE", "GST RATE"
    add:format:$NAME,20
    add:format:$VchStkItmBalance : "Base"
    ADD:format:$GSTIGSTRATE,10
     


  9. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Because the SOURCE COLLECTION is still there.......in the original.
     
    panam likes this.


  10. panam

    panam Member


    Amit sir, i am given Delete:format. then why it is not deleting the existing table.
    how to over come the problem of duplicating in table.
     


  11. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Step One........

    Find the correct one .... HOW ??? ....... Simple...all collections have titles .........

    Temporary put a new TITLE ---- Title : "List of Stock Items ---- newformat"
    Then check in screen if the new title comes....... (need to restart Tally, not just refresh)
     
    panam likes this.


  12. panam

    panam Member


    ok, Thank u Amit sir for your valuable reply and help.
    i will try it sir.
     


  13. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    By doing this, you will find the BASE Collection and therein you have to make your additions/changes.

    You are referring to the wrong one. It is right one, but as part of the source collection, hence the duplicate fields. Means there are 2 collections in one single one.
     
    panam likes this.


  14. panam

    panam Member


    Yes sir , u r right.
    I am taking wrong collection
    [#collection:VCHStock item Extract]
    Correct collection is [#collection:list of Stock items]
     
    Amit Kamdar likes this.


  15. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Good... now you can make your changes......

    Make it a regular point to verify the correct Form/Part/Report etc, before working on it. :)
     
    panam likes this.


  16. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    The CORRECT one is still........

    [#Collection: List of Stock Items]
    Add:Sub Title : "STOCK ITEM NAME", "GST RATE", "CLOSING QTY"
    Add : Format :$GSTIGSTRate, 10
    Fetch : GSTIGSTRate

    :):)
     
    panam likes this.


  17. panam

    panam Member


    Thank u very much sir. because of this forum and your kind support helped me in learning the tdl codes.

    Amit sir, i really appreciate you with full respect as you guided & give solutions regularly in this forum for all the queries.
     
    Amit Kamdar likes this.


  18. panam

    panam Member


    Dear sir,
    how to bring closing stock values after stock item name.
    currently closing stock coming at last column.

    [#Collection: list of stock items]
    Use : Alias Collection
    Title : $$LocaleString:"List of stock items"
    Type : stock item
    Fetch : Name,parent, VchStkItmBalance,GSTIGSTRate

    Add : SubTitle : $$LocaleString:"STOCK ITEM NAME","GST RATE","group"," CLOSING QTY "
    Format : $GSTIGSTRate,10
    Format : $parent: "Base"
    query1.jpg
     


  19. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    You are making a ADDENDUM to an existing Table.

    If you want, as you want it, then you need to DELETE the Table from the Field and add your own. But NOT ADVISABLE.
     
    panam likes this.


Share This Page