Best way to associate each object (line) to an unique ID for an inventory?

I made a simple inventory app that lists every object in the laboratories of a biology field station of an University. 

I made a column "#ID" but I think it should not be the KEY of the data table because it could be changed mannualy and has meaning ( it refers to the locals where the item is).

I would like to make a new "KEY" field that is unique, mandatory and generated automatically when a new item is added to the list. This "KEY" field should not be visible by users of the app and any "key" should not be reused by the app if someone deleted a row (I dont plan on delete any row, I even removed the delete button for users). The plan is to never delete rows, just indicate if the item has been "Deaccessioned" (yes or no).

So the question is: How do I make a "KEY" column where the item is associated with an Unique key, that is unique and can never be reused. This key could be made of letters and numbers but I don't want it to be too long because it will need to be scanable (I will print barcode to put on the items)

Thanks!

 

Vincentbhg2_1-1710726371121.png

 

0 1 39
1 REPLY 1

Make a column called "Key" and set the initial value to UNIQUEID()

Top Labels in this Space