Help

Re: Remove duplicates in look up field

6329 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Mathias_Elmose
7 - App Architect
7 - App Architect

I’m a big fan of look-ups but I would really like to be able to remove records the occur more than one time. Is there a way to do that?

110 Replies 110

You have ARRAYUNIQUE():

Thanks

Yes but it only works in Roll-Up not in Look-up. And when you use that you only get the text from a record, not a link to the record like you do in the Look-up.

I meant to use it in a Formula field. What are you trying to achieve?

I personally am trying to get a rollup of unique values, as the duplicates have no value as links.

This is not my particular use case, but let’s use a simpler recipe example…

There’s a Recipes table with linked tables called “Ingredients” and “Type”.

Ingredients has the following values:

  • Chicken
  • Bacon
  • Lettuce
  • Onions
  • Walnuts
  • Cheese
  • Bun

Type has the following values:

  • Fruit
  • Vegetable
  • Nut
  • Meat
  • Dairy
  • Bread

Using a “Chicken Club Sandwich” example, let’s say we wanted to use a look-up to provide the various food types for this sandwich recipe, the results would be “Dairy, Bread, Vegetable, Vegetable, Meat, Meat”.

Example:
image.png

However, “Dairy, Bread, Vegetable, Meat” would be much more useful, as the redundancies are removed. Example of what’s desired:

image.png

And here is my proposed solution (having a simple switch under the a Lookup field that links to another Linked Record field):

image.png

Why do you need it to be a lookup field rather than a rollup?

As @Elias_Gomez_Sainz suggested, you can use ARRAYUNIQUE() in a formula fild and apply it to a lookup field, if needs be.

Because I want the linked records to actually be linkable records for quick access, as opposed to just being text.

The rollup can display only unique values, but they’re just text and not the actual linked records. The same goes for using a a Formula on a Lookup field.

image.png

Also, speaking of formulas, ARRAYUNIQUE() doesn’t appear to be working correctly on Lookup fields, as non-unique values are also displaying.

image.png

image.png

Scott_Cytacki
4 - Data Explorer
4 - Data Explorer

I also want this feature. The simple example explains my use case as well.

Another way to look at this feature request:
Why would someone want duplicates in a lookup field?

Another more generic approach which would be cool (but probably would cause problems), is if there was an UNIQUEREFERNCES function that would return references that are unique. I’m guessing the formula engine doesn’t work with references so everything is converted before hand which would make this new function hard to implement.

You know, I have to admit I didn’t realize lookup fields worked that way. Live and learn…

As you’ve identified, this has something to do with the special way Airtable treats lookup fields/linked records. For instance, if you define in the [Ingredients] table a field called {TypeName} that is simply a lookup field that follows the {Type} link and returns the {Name} of the linked record, then a rollup of {TypeName} using ARRAYUNIQUE(values) properly removes the redundant entries. I sort of understand why Airtable doesn’t deduplicate lookups and linked records, but I can’t actually articulate it other than by waving my hands around…

David_Krizan
7 - App Architect
7 - App Architect

So here’s my proposed solution: simply add an “Only display unique linked records” switch in the Lookup field configuration menu.

This would both solve my problem, plus allow folks to allow duplicates to display if they need to for whatever reason (as the system currently does now).

That’s a great idea for a solution and exactly my thought @David_Krizan

The Ingridients example is great to illustrate the problem when the same ingrident appears multiple times.

Oliver_Holtz
6 - Interface Innovator
6 - Interface Innovator

I just want to chime in here to say that I have exactly the same problem. I have duplicates in lookup fields but can’t use rollup because I want to have the links to the actual records. Really, I don’t see why one would want to have duplicates in a lookup field ever.

If someone has figured out a workaround for this it would also be much appreciated!

Yes, cant find a fix for this. If anyone has any ideas let us know! Would love to see the platform updated to address this.

David_Krizan
7 - App Architect
7 - App Architect

Seriously Airtable, just add an “Only display unique linked records” switch when someone selects a Linked Record field from a Lookup field. This would be so useful and seemingly so easy to do because (1) y’all would know when a Linked Record field is being selected from a Lookup field, and (2) this should just be a simple filter.

Simple Mockup of Proposed Solution
image.png

I absolutely love that Linked Record fields can be used in Lookup fields, but I have NEVER ONCE wanted duplicate linked records displayed in a Lookup field, as any redundancy negates the utility of such. This problem comes up frequently and prevents me from doing some very useful things with my data.

Rasha
6 - Interface Innovator
6 - Interface Innovator

I’ve been keeping an eye on this for some time. Has anyone found a workaround or come across a product update I’m not aware of? It’s rather frustrating.

Noel_Jee
4 - Data Explorer
4 - Data Explorer

I’m looking for the same solution but there doesn’t seem to be a solution. Does Airtable actually go through these forums?

Remy_Margerum
4 - Data Explorer
4 - Data Explorer

You can make an instant Zap in Zapier that Zaps the text from the Rollup to a Linked field as a workaround for this for now.

Joe_Elmendorf
4 - Data Explorer
4 - Data Explorer

I ran into this problem too.
Here is my solution for the recipe example:
Make a hidden field in the Ingredients table that is a formula that duplicates the value of Ingredients -> Type, let’s call it “Type String”, then do a Lookup ARRAYUNIQUE() of Ingredients > Type String and it will work.

David_Pethick
5 - Automation Enthusiast
5 - Automation Enthusiast

This is a “must have” feature. It’s crazy to have the same link replicates several times. It’s just a filter over the top (underlying data can still be there) to make several of my views so much more valuable to users.

David_Walters
6 - Interface Innovator
6 - Interface Innovator

Agreed. This is a “must have” for me.