Unique values in a column


#1

Hi there! I’m just curious how I enforce unique values in a column or a group of columns – that is, how to enforce a unique constraint. So that I don’t, for example, accidentally enter the same person (combination First Name + Last Name) twice.


An option to require Unique Values for any given field
#2

You can add a new field, i’ll call it ID, and give it a formula record_ID(). You’ll find that even for 2 records with the same name+First name, internally, they are different. You can also add an auto numbered field in case you need a more visual and easy content on your layout.

Do you need to enforce unique First Name+Name ? Not always a good thing, not always possible. I remember the time were programmers wrote something like JohnOsborne1, JohnOsborne2, awful !

Hope it helps !


#3

Ah, yes – name was a bad example. But there are lots of legitimate times to enforce a unique constraint. So… As I’m understanding, this isn’t possible with AirTable, which means, essentially, it’s not a database, but rather a fancy spreadsheet. More Google Forms than MySQL.

Still, an interesting product – it’ll be interesting to see if it develops into a functional DBMS.


#4

Yes, i see!
The Primary Field, the first field in a table, should have the uniqueness you are asking for. I can’t see how to force it in " Customize field type".
Maybe you can apply a formula combining other fields or whatever magic calculation. I didn’t try yet.
Of course Airtable is not Mysql. I use it for what it is, a very good and easy tool for “online tables” for personal use or for a workgroup.

Would you mind posting this feature in the " FEATURE REQUESTS " section ?!