Ask Your Question

ID field in Base start with custom number [closed]

asked 2018-03-29 18:45:17 +0100

Bluesman gravatar image

updated 2020-09-28 19:34:48 +0100

Alex Kemp gravatar image

Hi, working with contact list in base. For the moment the id start with number "0" zero. When I start to enter my contacts I want the first start with "0101" and continue from this with the same number combination... is that possible?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2020-12-02 17:54:03.121924

1 Answer

Sort by » oldest newest most voted

answered 2018-03-29 21:26:49 +0100

Ratslinger gravatar image


You can have an auto-increment field start with a numeric of your choosing or reset it to pick up numbering higher than already present. See this post -> How to reset the autoincremention in Libreoffice Base.

The question is based on your wanting to start with '0101'. Typically an auto increment field doesn't show leading zeroes. It is at least part of the record key used by the DB to retrieve data (only one auto-increment field allowed in a table). You can present a leading zero by changing the format of the field to display it. However, this leads to another problem. if you change the format to include a leading zero, when you get to '1000' it becomes '01000' as a display. Internally, no matter what is displayed the value remains the same.

If this answers your question please tick the ✔ (upper left area of answer). It helps others to know there was an accepted answer.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-03-29 18:45:17 +0100

Seen: 814 times

Last updated: Mar 29 '18