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
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
[quote user="Tanveer Ahmad"]
@KTA
actually the main problem is assign 10000 to primary key and it will also be increment by 10000
[/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
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....
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.
@KTA
actually the main problem is assign 10000 to primary key and it will also be increment by 10000
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 picture
I guess that you've tried InitValue=1000 but that goes against the autoincrement
InitValue = 1000 not working
i want just like sales order line, Where Line No. start from 1000
I guess that you've tried InitValue=1000 but that goes against the autoincrement
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,269 Super User 2024 Season 2
Martin Dráb 230,198 Most Valuable Professional
nmaenpaa 101,156