unique ID skips number

Discuss HanDBase running on RIM BlackBerry devices and synchronization with a desktop.

unique ID skips number

Postby seanm » Wed Jul 01, 2009 12:21 pm

The unique ID field skips a number when a new record is added. It's in a relationship with another db. What is the problem?
seanm
 
Posts: 3
Joined: Wed Jul 01, 2009 12:01 pm

Re: unique ID skips number

Postby dhaupert » Thu Jul 02, 2009 11:24 am

seanm wrote:The unique ID field skips a number when a new record is added. It's in a relationship with another db. What is the problem?


The unique field type is not an auto number field. The entire database uses a single unique number generator, and so if you have for example two unique fields, they will share the generator and you'll see something like this:

Field 1, Field 2
0, 1
2, 3
4, 5
etc

If you are using a link field type, it too uses the same generator, so if you have a link field you'll see:
Field 1, Link field
0
2
4
6


because the link is internally using the same value. Hope this makes sense- if you are looking for something that will number each record sequentially, there isn't really a field type to do that right now. I have seen people use the calculated field to add one to a previous records' value, and then use that as the default value in a text field. But this only works if the filters are not set to hide records, since it relies on the previous record always being the highest numbered entry.
dhaupert
 
Posts: 4111
Joined: Tue May 26, 2009 11:51 am


Return to HanDBase for BlackBerry

Who is online

Users browsing this forum: No registered users and 1 guest