Serial number

Discussion in 'Tally Developer' started by shradha bas solution, Feb 5, 2015.

    

  1. How can i generate a serial number in a form like voucher no. if i m making and udf form for registration
     



  2. Please help me with the code
     


  3. HVPatel

    HVPatel Active Member


    If you want Auto increment of Number in your UDF field available in Voucher Form, try this
    [Field : Your Field]
    Set As : @@CurrentSerialNumber

    [System : Formulae]
    LastSerialNumber : $$CollectionField:$UDFofYourField:mad:@LastItem:HPCollection ;; your collection name
    CurrentSerialNumber: $$Number:mad:@LastSerialNumber + 1

    [Collection: HPCollection] ;; your collection
    Type : Voucher

    Regards
    H V Patel
     



  4. Its not working the number is not been incremented if i want this in ledger before name for its uniqueness than
     


  5. SINTO PARAVA

    SINTO PARAVA Member


    ;;for stock items auto part number creation





    [Collection:sitems]
    Type: stock item
    Fetch: name,MAILINGNAME,sprifixname,sbatchname
    ;; Sort : @@Default : $sbatchname
    Compute: vsbatchname:$$Number:$sbatchname + 1
    Sort : Default : $$Number:$sbatchname


    Format:$vsbatchname,10


    [#field : STKI PartNo]
    Set Always: Yes
    ;; Set as:$$String:($$Number:$$CollectionField:$sbatchname:Last:sitems)

    ;;Set as: if ($$Line=1) and not $$InEditMode then @all else ""

    all:mad:cl1 + ($$String:mad:cl2)
    cl1:$$LocaleString:#STKIsprefix +

    cl2:($$Number:(@calc + 1))
    calc:$$FilterValue:$sbatchname:sitems:Last:IsCurrSTKItemName
    ;;; ($$Number:$lastreadingnos+1);;:stockitem:$stockitemname

    Skip:$$InCreateMode;; ($$Line=1)

    Set By Condition:($$Line=1) and $$InCreateMode: @all


    ;[System: Formulae]
    ; IsSameItemName : $StockItemName = $$Owner:$StockItemName


    [#Part: STKI Basic Features]
    Add: Part: After: STKI Batch:sprefix

    [Part: sprefix]
    Line:stkisprefix
    [Line: STKI sprefix]

    Fields : Medium Prompt, STKI sprefix,stkialias
    Local : Field : Medium Prompt : Set as : $$LocaleString:"Prifix Details:"
    Space Top : 0.5



    [Field: STKI sprefix]


    Use : short name Field
    Width : @@NumberWidth
    Set as : " "
    Storage: sprifixname


    [Field: stkialias]
    Use: number field
    Set as: $MAILINGNAME
    Storage: sbatchname
    Set Always: Yes

    ;; Set as:$$CollectionField:mad:calc:1:sitems
    Set as:mad:calc+1
    calc:$$FilterValue:$sbatchname:sitems:Last:IsCurrSTKItemName
    Invisible:Yes

    [System: udf]

    sprifixname: String:201
    sbatchname : Number:202
     



  6. Hello Sir, formula not working???
     


  7. Ganesh Raju Awale

    Ganesh Raju Awale New Member


    Hello Sir, formula not working???
     


Share This Page