Autonumber in inputting new records

Lea Pagkaliwangan Espinar

My patient number(pnum) need to have a autonumber, like BLHC-2014-0001. I need to automatically have the BLHC-current year-and auto increment of the number with 4 digits when i input new record.

LOKESH
function autonum(){                           
    var c ='BLHC-2014-0001';

    var d = c.split("-");
    var e = d[2];
    var f = parseInt(e,10);
    var g = f+1;        
    var str = '' + g;
    var pad = "0000";    
    var resu = str.length < 4 ? (pad+str).slice(-4) : str;
    var lt = d[0]+'-'+d[1]+'-'+resu;               
    document.getElementById("pnum").value =lt;
}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

For new record, autonumber value is out of sequence

From Dev

DataGridView with DataTable/BindingSource Not Showing New Autonumber ID

From Dev

VBA Access Need to obtain autonumber before saving new record

From Dev

Data macro (trigger) to apply constraints when inputting records into an Access table

From Dev

Check for new records

From Dev

Handling new records in meteor

From Dev

SQLITE import records, export only new records

From Dev

New record after a year of no records

From Dev

ON DUPLICATE KEY creating new records

From Dev

Insert into and replace old records with new

From Dev

Insert into and replace old records with new

From Dev

Creating new records in MSACCESS Table

From Dev

SQL: insert only new records

From Dev

autonumber not distintc in access

From Dev

Autonumber in org-mode

From Dev

MS Access Autonumber dilemma

From Dev

Getting last autonumber in access

From Dev

Excel autonumber range

From Dev

Codeigniter: How to make Autonumber

From Dev

Update column with autonumber

From Dev

how to validate existing records with new records in frontend using Jquery

From Dev

drop table and insert records from a new select statement (with the correct records)

From Dev

insert new record between records and update next all records by +1

From Dev

Create new records when no records exist with a FieldB Value

From Dev

Save whole range of (grid) records in new records list

From Dev

Odoo 8 - records browse equivalent with new api?

From Dev

Adding a new field to 100 million records in mongodb

From Dev

Schedulable Class not creating new records - Not doing anything

From Dev

Subform won't add new records

Related Related

HotTag

Archive