An option to require Unique Values for any given field

+1 for unique primary field aka Primary Key – Optional is fine – read more below

Obviously, if this was added at this point, would have to make it an option ELSE it could blow up existing solutions. That’s fine. Adding as an option is great, and default being off is even fine. And if adding it to primary field, then allow uniqueness to be an option on any field. Please. Pretty please. Really. When is this coming?

1 Like

A bit of a workaround that you could use is using the “Unique” at the bottom of your view. As long as it is “100%”, you know there are no duplicates.

unique

3 Likes

+1 for this request. At a minimum, I’d like to make sure that we’ve not accidentally duplicated order numbers that should be unique. Ideally, with this feature it would at least alert us that there is another entry that matches. Would be helpful for both numbers (most important) and text. Fuzzy logic would be a bonus here so we can be alerted if text entered seems “similar”. Of course, we can do all this manually with grouping and sorting, but with over 10K records that seems like a tremendous waste of time when a computer could do it for us on the fly.

I previously commented on this post about setting this up in zzBots.

You can now install this as a Bot Pack in the Bot Store here: https://www.zzbots.com/store/ts8rTRcNMqRiHhSvR

Disclaimer: I am affiliated with zzBots

Just signed on to give AirTable a go and just as quickly have to give up on it. I couldn’t get beyond two tables before I realized there was no true primary key field. In AirTable’s definition of primary field they indicate it should be unique but offer absolutely no way of enforcing said uniqueness.

Is this still not possible?

2 Likes

Not being able to force PK uniqueness makes airtable completely useless.

2 Likes

Unfortunately, you cannot enforce unique values in Airtable itself, but if your data is coming from a form, we’ve built an extension that allows you to prevent duplicates.

1 Like

adding my +1 to this. Surprised it doesn’t exist :frowning:

3 Likes

I haven’t written it up, but I assume you can write a script in the script block so that when that field is imputed if there is a match in that existing column, it either clears out the field or adds a 1 or something at the end of it.

Would be especially important to have unique formula fields.

For instance, take an “Application” and a “Version” table.
An “Application” field on “Version” links to an “Application” record.
A “Name” field on “Version” describes the version name.

You wouldn’t want to have multiple records combining the Application “Sublime Text” and version “3.2.2” at any given time.

You can see how this is usually achieved in a database like Postgres here.

A way to achieve this in Airtable would be to make a formula such as “RECORD_ID() + " " + Name” and activate a “unique” flag on it.

I am sure the details of such an implementation are complex, but I think the general need for something like this makes sense.

+1 - I know very little about DB design but understand this dog won’t hunt… isn’t this option part of the fundamentals or basic design of a DB? SHOCKED it doesn’t exist… I just created my fist table and spent 45 minutes trying to figure out how to ensure my Primary Key is unique. So sad to find out this great app is a waste without this.