Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Oct 02, 2018 02:57 AM
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?
Oct 02, 2018 06:56 AM
You have ARRAYUNIQUE()
:
Oct 03, 2018 09:17 PM
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.
Oct 04, 2018 01:36 AM
I meant to use it in a Formula field. What are you trying to achieve?
Oct 18, 2018 10:42 PM
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:
Type has the following values:
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:
However, “Dairy, Bread, Vegetable, Meat” would be much more useful, as the redundancies are removed. Example of what’s desired:
And here is my proposed solution (having a simple switch under the a Lookup field that links to another Linked Record field):
Oct 21, 2018 09:41 AM
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.
Oct 22, 2018 10:05 AM
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.
Also, speaking of formulas, ARRAYUNIQUE() doesn’t appear to be working correctly on Lookup fields, as non-unique values are also displaying.
Nov 02, 2018 06:13 AM
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.
Nov 03, 2018 05:19 AM
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…
Nov 05, 2018 09:30 AM
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).