Need Help to Auto Numbring Alias

Discussion in 'Free Source Codes' started by Prasanna Pathak, Dec 17, 2017.

    

  1. Hello Every One
    Need Idea to make Alias For Each new Item it should have new no
    such as
    after creating first item
    Keayboard alias will be 101
    after creating second item
    Mouse alias will be 102
    after creating third item
    HDD alias will be 103
    Number Should increase by one Number
    or every time it will be different from previous alias

    How should I define variable for this

    or any another idea

    it is Hearty Request for Help to every one
     


  2. D Lokesh

    D Lokesh Member


    Hi Sir,

    find the below code it'll generate auto number for each item.

    [#Field: STKI PartNo]

    Setas : If ($$Line=1 AND $$InCreateMode) then $$ZeroFill:mad:SCTotal:6 else $$Value
    Type : String : Forced
    SetAlways : Yes
    SCTotal : (@YsstartPartNo + @YSNumstock)
    YsstartPartNo : 1
    YSNumstock : $$NumStockItems
    Max : 6
    Skip : Yes​
     
    Bhawna likes this.



  3. Thanks a lot sir ji:D:D:D:D:D:D
     



  4. Thanks a lot sir ji:D:D:D:D:D:D
     



  5. Thanks a lot sir ji:D:D:D:D:D:D
     


  6. D Lokesh

    D Lokesh Member


    It's my Pleasure
     



  7. While I am Making Code for Alias it is applied all Alias like voucher, ledger,Item,all Groups
    I only want it for Stock Item Alias not anything else
    What should i do ?
     



  8. While I am Making Code for Alias it is applied all Alias like voucher, ledger,Item,all Groups
    I only want it for Stock Item Alias not anything else
    What should i do ?
     


  9. Sumitsitm000

    Sumitsitm000 New Member


    #report:stock item
    Then locally change set as.
     


  10. yogi parekh

    yogi parekh New Member


    Setas : If ($$Line=1 AND $$InCreateMode) then $$ZeroFill:mad:SCTotal:6 else $$Value

    sir what is this symbole after $$Zerofill
     


  11. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    ":" followed by @
     


  12. ONKAR

    ONKAR Active Member


    @Amit Kamdar sir, NOT WORKING SIR, showing me duplicate entry, or not changed the part number, see this screenshot, sir
     


  13. ONKAR

    ONKAR Active Member



  14. ONKAR

    ONKAR Active Member


    @Amit Kamdar sir and @garima sir, as I have a grocery store, I have more than 3000 stock items, more of them in the company Products, they have own companies barcodes, but what we sell in loose products, such as Turdal 1 kg, so for that I need a barcode of mine, then I want to change in it for Turdal 2 kg automatically but not happening through this code. please solve this sir. for more see my screenshot sir, when I create a demo purpose stock item like ok - showing me like 000000 - 6 times / numbered part number, then I create second stock item like ok 2 then show me like duplicate entry means not changes automatically part number
     


  15. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    SCTotal : @YSNumstock
     


  16. ONKAR

    ONKAR Active Member


    @Amit Kamdar sir, not working sir Ji. I added like this sir, but not working and see this showing only 00000 not starting 1 number only 00000

    [#Field: STKI PartNo]

    Setas : If ($$Line=1 AND $$InCreateMode) then $$ZeroFill:SCTotal:6 else $$Value
    Type : String : Forced
    SetAlways : Yes
    SCTotal : @YSNumstock
    YsstartPartNo : 1
    YSNumstock : $$NumStockItems
    Max : 6
    Skip : Yes
     


  17. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    You are very intent on copy/paste and also trying to be fast.....and therefore you MISS out the important details........

    So you are missing out an very important CHARACTER in your SETAS line........... so please study properly and implement it. By now you are an experienced coder, so such simple mistakes should not have happened ...........

    As a proof....I show you my screens......... it is working for me.......

    1.PNG

    2.PNG
     
    ONKAR likes this.


  18. ONKAR

    ONKAR Active Member


    @Amit Kamdar sir, sorry sir, now I got sir, I missed @ symbol in set as line, now the problem is solved, see this images, thank you, sir Ji. but I need some help , how can I get custom numbers like 8987789812 but in this code only 000000, how to get custom numbers


    SCREEN SHOT 1.jpg

    SCREEN SHOT 2.jpg
     


  19. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    remove SKIP : yes........... and in case you need a different number, simply type it.

    Also remove... MAX : 6....... if length is any characters.
     
    Johar likes this.


  20. ASHOK

    ASHOK Member


    Sir ji ONKAR ji your pic me GST TAX RATE DETAIL KASE AATI HAI
     


  21. ONKAR

    ONKAR Active Member


    LIKE THIS SIR ??

    [#Field: STKI PartNo]

    Setas : If ($$Line=1 AND $$InCreateMode) then $$8899721231111Fill:SCTotal:13 else $$Value
    Type : String : Forced
    SetAlways : Yes
    SCTotal : @YSNumstock
    YSNumstock : $$NumStockItems
     


  22. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    refer Tally developer and learn....such simple things you should be able to learn and develop............

    From the above, it seems you do not know at all and also not willing to learn.

    Also read very carefully what I have written in previous post.............you can read it again..........slowly and understand and then implement it.........
     
    ONKAR likes this.


  23. ONKAR

    ONKAR Active Member


    yes, sir, I removed this SKIP: yes and MAX: 6 but can't understand where to add the custom number.
     


  24. Sanjeev S

    Sanjeev S Active Member


    Dear Onkar Sir,

    My suggestion is if you want to put 13 digit standard item code then ideally keeping your logic intact put this in item alias. Beauty of Tally is it allows all.

    Secondly, the logic used for part no $$NumStockItems might have an issue if any item is deleted.

    Instead I use as below (only change is I am using Item alias instead of PartNo)

    [#Form : Stock Item]
    Local : Field : MST Alias: Set As : +
    If $$Line=1 And $$InCreateMode Then ($$String:mad:@MyCode) +
    else if $$Line=1 And $$InAlterMode and $$IsEmpty:$Name then ($$String:mad:@MyCode) +
    Else $Name
    Local : Field : MST Alias: Set Always : Yes


    [system : formulae]
    MyCode1 : @@MyNCode
    MyCode : $$ZeroFill:mad:@MyCode1:6
    LNo : $$CollectionField:$OnlyAlias:1:InstaAStocks
    LNoNum : $$Number:mad:@LNo
    MyNCode : @@LNoNum + 1

    [Collection : InstaAStocks]
    Collection : List of StockItems
    Fetch : MasterId, PartNo, OnlyAlias
    Sort : @@Increasing : -$OnlyAlias, $Name
    Format : $Masterid
    Format : $OnlyAlias
     
    Bhawna likes this.


  25. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Good one...Sanjeev
     
    ONKAR and Sanjeev S like this.


Share This Page