You are viewing this site as a guest. You can still ask questions and help others! Join our Dev2Dev IT Community to receive your own blog, share your knowledge, and much more.

auto increment field value

2 replies [Last post]
potanavarma's picture
User offline. Last seen 8 years 32 weeks ago. Offline
Joined: 08/24/2011
Posts: 1

HI,
how to increment field value automatically in record.

Ashish's picture
User offline. Last seen 8 years 30 weeks ago. Offline
Joined: 08/29/2011
Posts: 1
Re: auto increment field value

You can use GetNextNumber() function.
Syntax : GetNextNumber(record.fieldname,max_range);
e.g. : GetNextNumber(Emp_detail.emp_id,99999);

But it's better to get the maxium value of that particular field and increment it by +1. You can write code in page activate.

Regards
Ashish Rawat

Guest's picture
Guest (not verified)
Re: auto increment field value

It would be better to set up auto numbering for that particular field.
SEtup>Common definition>Codes and Auto Numbering.

Now call the delivered function and assign the auto generated number to your field.

Regards,
Rahul