0

Why does Ninox 'remember' deleted Ids?

If i have a new table with 10 rows, Id numbers will go from 1-10.

However if i delete the last three rows (8,9 and 10), then create a new row, the Id number of the new row is 11.

So now the table's Id numbers go from 1-7, then jump to 11.

This looks wrong, and destroys the logical sequence of Id numbers.

Why does Ninox do this, and is there any way to get around this (besides not deleting any rows)?

8 replies

null
    • Rico
    • 4 yrs ago
    • Reported - view

    It also puts Id numbers out of sync with the row numbers on the far left, so you could be looking at row 132, but Id number 154.

    • Ninox partner
    • RoSoft_Steven.1
    • 4 yrs ago
    • Reported - view

    It has something to do with sync possibilities of Ninox, when you delete records on one device, the same id still exists on another device. Now when you create another record with the same id you've just deleted, then the two records on the separate devices could contain different data. This is also the reason why i've said in another thread it's not a good idea to use Id to make an auto-increment field.

    • Rico
    • 4 yrs ago
    • Reported - view

    Alright, thank you for the explanation.

    • Rico
    • 4 yrs ago
    • Reported - view

    The reason i raised this is because i've inadvertently created blank rows in various tables.

    I'm not keen on deleting them, because it will create an out-of-sequence Id, but i don't know how else to get rid of them. I'm unlikely to fill these blank rows with more entries in some tables, because they contain limited information.

    This is partly why i asked about write protecting the tables.

    So my questions are:

    1) Can blank rows still mistakenly be added to write protected tables?

    2) Is there a way to eliminate blank rows without messing up the Id sequence?

    • Ninox partner
    • RoSoft_Steven.1
    • 4 yrs ago
    • Reported - view

    In some versions (stand alone with icloud sync)there's an reorganize option in the menu next to the database-icon. maybe this will help with the "out of sequence" Id's. Not sure if this will work but worth the try...

    • Ninox partner
    • RoSoft_Steven.1
    • 4 yrs ago
    • Reported - view
    • Rico
    • 4 yrs ago
    • Reported - view

    Thanks for the suggestion.

    I'll try it on a test database first to see how it goes. If it looks promising i'll try it on the real thing.

    I'll report my results later...

    • Rico
    • 4 yrs ago
    • Reported - view

    I've confirmed that blank rows can be added even if the table is write protected, so how can you eliminate blank rows being created?

    I don't even know how they're getting there. I don't go to the tables and add them, but somehow when i look up the table or visit, hey presto, there are some new blank rows.

Content aside

  • 4 yrs agoLast active
  • 8Replies
  • 1770Views