An ID should be saved as a field or?

I have an ID for a specific “thing” i measure and that id is a integer. I have tried to use the TAG for this but the problem is that TAG is a string so when i sort i have problems. How/where should i save this id ?


Can you put your code here and we can help you.