How to set again to 0 Id Integer at table.

How to set again to 0 Id Integer at table.

  

How to start off to 0 ? Thanks and Cheers!! 

Hi Raven,

you can search  the sequence table in the Outsystems database and just update the next sequence number.

regards,

indra

Where is this sequence located at? Im using mobile application. Cheers and sorry first time using this system

Hi Raven,

In the local storage on mobile it's not possible to do that. For server-side entities it's possible, but you need direct access to the database.

Hello Raven,

Can I stress out the importance of doing proper training? :)

Now, on your question.
Afaik, it is the database that controls "autonumber" columns, not OutSystems. Each database does this its own way.

There is no "code" way to reset identifier column, in OutSystems.

If you have access to the database, you can Trucate the table.
In OutSystems, you can also copy the entity, delete the old one and rename the new one to have the same name. This will create a NEW table in the database, with the ID counter set to 0. Be aware that you will have to remove all references to the old tables in the Manage Dependences in all consumer modules, and add references to the new ones AFTER this.

And this means you will have to erase data on any table that has FKs to this one.

You can also use a NOT autonumber identifier column, but than you will have to control the next ID by yourself and this is not as straightforward as it seems to be.

And, of course, WHY do you need to do that? Generic identifiers are used to give a unique "name" to a record and make the connections between tables. They are, by definition, "meaningless". If you want to give a number with a meaning, use a different attribute. This way you don't have to care about the Ids values. 

Hope this helps.

Cheers.