0

Is there a way of setting ID counter back to 1

Is there a way of setting ID counter back to 1.  The table itself is empty afater I deleted some incoreectly imported records but it would be great if when I re-import that records start from ID 1 etc

Many thanks

9 replies

null
    • Choices_Software_Dean
    • 3 yrs ago
    • Reported - view

    Select "Edit fields" and then click "Duplicate table" (lower left).

    • jel888
    • 3 yrs ago
    • Reported - view

    Hello, I have this quesstion too; however I don't understand about duplicating the table, as in my case it's an ID field in the GANTT view (part of Ninox).

    • Choices_Software_Dean
    • 3 yrs ago
    • Reported - view

    I am guessing that you might be confusing the row number column with the Id column. Unlike the row number column, the Id column contains a unique Id for each row. If a record is deleted, the Id number for that record is gone from the table forever.

     

    Try going back to the table view. If you do not see a column named "Id", then click the filter icon and drag the Id column from right to left. Now when you go back to the table view you will see the Id column. Duplicating a table will reset the Id column to start with the number 1.

    • jel888
    • 3 yrs ago
    • Reported - view

    Hello, nope, no confusion.  I'm talking about the ID column (a unique automatic number given each time a record is created). Like Ken, I'd like to reinitialize it so that when I begin using the database after I've played wiht it ands tested it for others.  That way the first record entered (for real) will have an ID of "1", not "20" (or the like).  And I understood what you said about duplicating the tabel to reintialize the ID column; however in the example I gave, the ID column is part of the "GANTT" view, a choice in Ninox.  Since I didn't create the view by scratch and am very much a beginner in Ninox (with a tab history and some old Acces DB background), I don't see where to do this (i.e. it's not a table in the DB, but a view).

    • jel888
    • 3 yrs ago
    • Reported - view

    Sorry for all the typos!  Hope you understand. ;)

    • jel888
    • 3 yrs ago
    • Reported - view

    Okay, I researched a bit and found out how to do what you suggested, duplicate table.  I couldn't find how to do that, but then foudn that when your in a table you have to click on the cog (settings wheel) > edit fields > duplicate table at the bottom.  So in my case I had to duplicate two related tables.  Thanks a lot! ;)

    • Choices_Software_Dean
    • 3 yrs ago
    • Reported - view

    "the ID column is part of the  'GANTT' view"

    Could you please show a screen shot?

    • jel888
    • 3 yrs ago
    • Reported - view

    Screenshot 2020-08-21 at 23.23.07

    • jel888
    • 3 yrs ago
    • Reported - view

    Note thought that I did figure out how to apply your solution, so again, thank you!

Content aside

  • 3 yrs agoLast active
  • 9Replies
  • 936Views