Notifications
Announcements
No record found.
hi all,
i have a primary key field with type of integer and autoincrement = true, i want when i insert the record the primary key field start from 1000.
*This post is locked for comments
I guess that you've tried InitValue=1000 but that goes against the autoincrement
KTA picture
InitValue = 1000 not working
i want just like sales order line, Where Line No. start from 1000
You can try a different approach maybe it isn't the more efficent one but it should work. Instead using autoincrement you can use findlast and if there's one use previous+1 and if not =1000
@KTA
actually the main problem is assign 10000 to primary key and it will also be increment by 10000
Hi,
Please go the page where you have added that field and in the properties of that page give autosplitkey = "YES" and you will get you desired output.
I have answered upto my understanding.
Regards,
Bharath K
Please mark it as verified if found useful.
Open the table and manually insert a record with value 999. Then the code or process will automatically increment based on that value so the next value will be 1000....
[quote user="Tanveer Ahmad"]
[/quote]
In the first one because you couldn't find last record, i would be solved. Like this:
IF (rec.FINDLAST) THEN
Number:=rec.Number+1
ELSE
Number:=10000;
You can also use Suresh idea and make one entry of 999 and then autoincrement will work
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
HoangNam 7