Welcome! Log In Create A New Profile

Advanced

Create Autonumber

Posted by kanganip 
kanganip
Create Autonumber
May 19, 2015 04:33PM
hi
i'm newbie
help me
how to make automatic number, in which the numbers are drawn from other file, for example, the first 4 digits of fiel table "A" next automatic number
Al
Re: Create Autonumber
August 31, 2015 06:09AM
Hello Kanganip

A simple way is to have a single record "SystemNumbers" file with fields for the various number sequences you require , so field for "InvoiceNo" another for "OrderNo" etc

When you need to provide a new Invoice number
Hreadfirst(SystemNumbers)
Lock the record
SystemNumbers.InvoiceNo ++
HModify("SystemNumbers")
Unlock the record

Regards
Al
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: