Ask Your Question

ID field in Base start with custom number

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

Bluesman 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 close merge delete

1 Answer

Sort by » oldest newest most voted

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

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
Login/Signup to Answer

Question Tools

1 follower


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

Seen: 276 times

Last updated: Mar 29 '18