Skip to main content

The result I am looking for is similar to the ARRAYUNIQUE function for a Rollup field. However, the results are a link to another table, and it seems that using a rollup can only show text results as opposed to clickable records. How can I make lookup field show only unique results, or make the unique results of a rollup field clickable?



I don’t understand. The results of a Lookup field are not clickable neither.



Anyway, could explain a little further? I don’t know what are you trying to do 🤔


When I first read your post, I was pretty sure I knew what you meant — but once I tried to dummy up a base demonstrating it, I confused myself. Rather than spread that confusion around, I won’t link to that base; instead, let me know if this comes anywhere near your intent.



It appears to me you want to perform a lookup from oTableA] to oTableB] where the field you wish to look up is a linked records field connecting to oTableC]. In doing so, you want to be able to click on a returned value and have the corresponding record in oTableC] open. Furthermore, you want the returned values to be de-duplicated, containing only unique entries.



Am I anywhere close? If so, I have good news and bad news.



The bad news is that what you wish to do cannot be done, as far as I know, within the scope of standard, core Airtable functions. As @Elias_Gomez_Sainz points out, once a value is returned through lookup, it is no longer a link to a record; instead, it simply contains the value of the primary field of the formerly linked record.



The good news is, given that value, it is a trivial task to recreate the original link. This can be performed manually with a handful of keystrokes; alternatively, it can most likely be automated using Zapier or IFTTT.



Here is the process for performing this manually: I assume you have defined the lookup field and have been rewarded with a response containing the values of the primary fields of the linked records, including possible duplicates. At this point, you have two options:







  1. If your database is complete — that is, if you do not anticipate adding any more records to the table at hand, you can right-click on the lookup field, select ‘Customize field type,’ and change the field type from ‘Lookup’ to ‘Link to another record,’ indicating the field should link to uTableC]. After a moment, Airtable will have converted the field to a link records field and the static values to live links to records in TableC]. In the process, redundant links are combined, effectively leaving you with only unique items.







  2. However, if yours is a living database with records added regularly, the approach described in the previous entry is unsuitable. If you need regular, incremental, and ongoing conversion of looked-up values to links, you can accomplish this by copying from the lookup column and pasting into a linked records column. This preserves the integrity of the data in the original lookup field and allows subsequent conversions to be made without having to ‘back out’ previous changes.



    To support ongoing conversions, first create a new field in TableB]; configure it as a linked records field pointed at iTableC]. Click the cell for row 1 of the lookout field you wish to convert. Scroll to the last row of the table and, while holding down the Shift key, click in the cell for the lookout field for the bottom-most row. In the lower left of the screen, a message reading ‘### cells selected’ should appear. Press Ctrl-C; in the lower left, an alert reading ‘### cells copied’ will appear.



    Finally, return to row 1 of the table. Select the frame in row 1 for the linked records field you just now created. Press Ctrl-V to paste the looked-up values into the linked records field. Airtable automatically converts the values to links and eliminates duplicate entries.When you next add records to the table, you need only to copy/paste the lookout fields from the newly entered records to the linked records field.







I suspect one could easily configure Zapier to perform this same copy/paste operation — albeit one record at a time. (I do not know how strictly Zapier enforces matching types, though; conceivably it might not permit one to paste the results of a lookup field into a linked records field.) If you are interested in pursuing this option, in the sDocumentation] table of my Wardrobe Manager base from Airtable Universe you will find a document entitled Wardrobe Manager Zapier Guide. It provides step-by-step instructions on configuring a Zapier Zap that will copy the contents of one cell of a newly added record into another cell of that same record. Although in the guide the data flows from a text-formatted formula field to a long text field, rather than from a lookout field to a linked records field, the process and the bulk of the programming should be identical.



Again, feel free to ignore any of this that doesn’t apply to your situation. If none of it is applicable, let me know a little more about your intent, and I’ll try again.


When I first read your post, I was pretty sure I knew what you meant — but once I tried to dummy up a base demonstrating it, I confused myself. Rather than spread that confusion around, I won’t link to that base; instead, let me know if this comes anywhere near your intent.



It appears to me you want to perform a lookup from oTableA] to oTableB] where the field you wish to look up is a linked records field connecting to oTableC]. In doing so, you want to be able to click on a returned value and have the corresponding record in oTableC] open. Furthermore, you want the returned values to be de-duplicated, containing only unique entries.



Am I anywhere close? If so, I have good news and bad news.



The bad news is that what you wish to do cannot be done, as far as I know, within the scope of standard, core Airtable functions. As @Elias_Gomez_Sainz points out, once a value is returned through lookup, it is no longer a link to a record; instead, it simply contains the value of the primary field of the formerly linked record.



The good news is, given that value, it is a trivial task to recreate the original link. This can be performed manually with a handful of keystrokes; alternatively, it can most likely be automated using Zapier or IFTTT.



Here is the process for performing this manually: I assume you have defined the lookup field and have been rewarded with a response containing the values of the primary fields of the linked records, including possible duplicates. At this point, you have two options:







  1. If your database is complete — that is, if you do not anticipate adding any more records to the table at hand, you can right-click on the lookup field, select ‘Customize field type,’ and change the field type from ‘Lookup’ to ‘Link to another record,’ indicating the field should link to uTableC]. After a moment, Airtable will have converted the field to a link records field and the static values to live links to records in TableC]. In the process, redundant links are combined, effectively leaving you with only unique items.







  2. However, if yours is a living database with records added regularly, the approach described in the previous entry is unsuitable. If you need regular, incremental, and ongoing conversion of looked-up values to links, you can accomplish this by copying from the lookup column and pasting into a linked records column. This preserves the integrity of the data in the original lookup field and allows subsequent conversions to be made without having to ‘back out’ previous changes.



    To support ongoing conversions, first create a new field in TableB]; configure it as a linked records field pointed at iTableC]. Click the cell for row 1 of the lookout field you wish to convert. Scroll to the last row of the table and, while holding down the Shift key, click in the cell for the lookout field for the bottom-most row. In the lower left of the screen, a message reading ‘### cells selected’ should appear. Press Ctrl-C; in the lower left, an alert reading ‘### cells copied’ will appear.



    Finally, return to row 1 of the table. Select the frame in row 1 for the linked records field you just now created. Press Ctrl-V to paste the looked-up values into the linked records field. Airtable automatically converts the values to links and eliminates duplicate entries.When you next add records to the table, you need only to copy/paste the lookout fields from the newly entered records to the linked records field.







I suspect one could easily configure Zapier to perform this same copy/paste operation — albeit one record at a time. (I do not know how strictly Zapier enforces matching types, though; conceivably it might not permit one to paste the results of a lookup field into a linked records field.) If you are interested in pursuing this option, in the sDocumentation] table of my Wardrobe Manager base from Airtable Universe you will find a document entitled Wardrobe Manager Zapier Guide. It provides step-by-step instructions on configuring a Zapier Zap that will copy the contents of one cell of a newly added record into another cell of that same record. Although in the guide the data flows from a text-formatted formula field to a long text field, rather than from a lookout field to a linked records field, the process and the bulk of the programming should be identical.



Again, feel free to ignore any of this that doesn’t apply to your situation. If none of it is applicable, let me know a little more about your intent, and I’ll try again.


I believe this feature request would help, no?





The above feature (quoted from Jeremy_Oglesby’s response to a feature request) would provide us with a more general solution.


I think the following thread is essentially requesting this feature: Remove duplicates in look up field



I personally am trying to get a rollup of unique values, as the duplicates have no value as links. So, I’m essentially having to use a jury-rigged workaround similar to what @W_Vann_Hall is suggesting.



This is not my particular use case, but let’s use a simpler recipe example (I also posted this in a reply to the above link)…



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:




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):




This is exactly what I am looking for - so it’s not possible yet @David_Krizan?


This is exactly what I am looking for - so it’s not possible yet @David_Krizan?


You could try using a Rollup field with the ARRAY_UNIQUE(values) Rollup function.


You could try using a Rollup field with the ARRAY_UNIQUE(values) Rollup function.


I tried that - it doesn’t work. For some reason, it doesn’t see the duplicates


This is exactly what I am looking for - so it’s not possible yet @David_Krizan?


Nope, not available yet, much to my displeasure. I’ve tried to find some workarounds, but they’re all janky and inelegant. This really, really, REALLY should be an easy and obvious feature to include. Very frustrating…


You could try using a Rollup field with the ARRAY_UNIQUE(values) Rollup function.


Bravo!! This worked perfectly!!! But it is ARRAYUNIQUE(values)


Nope, not available yet, much to my displeasure. I’ve tried to find some workarounds, but they’re all janky and inelegant. This really, really, REALLY should be an easy and obvious feature to include. Very frustrating…


Hi David,


I did the Rollup + ArrayUnique{} and got text-only uniques as you pointed out. Then I changed the field type to Link Records and voila – the text now links.


Hi David,


I did the Rollup + ArrayUnique{} and got text-only uniques as you pointed out. Then I changed the field type to Link Records and voila – the text now links.


I know that that works, but what I really want here is to set a Lookup field that’s looking-up a Linked Record field in another Linked Record to only display unique fields as clickable linked records. Right now this works except the ability to display linked records (every linked record – including duplicates – is displayed). If there was simply a “Only display unique linked records” switch that would display when you’re looking up a linked record field, this would work.



I want to keep it how it currently works except having the ability to remove duplicates (showing duplicates here provides no value to me, but the converse would be incredibly valuable for many use cases).


I know that that works, but what I really want here is to set a Lookup field that’s looking-up a Linked Record field in another Linked Record to only display unique fields as clickable linked records. Right now this works except the ability to display linked records (every linked record – including duplicates – is displayed). If there was simply a “Only display unique linked records” switch that would display when you’re looking up a linked record field, this would work.



I want to keep it how it currently works except having the ability to remove duplicates (showing duplicates here provides no value to me, but the converse would be incredibly valuable for many use cases).


What’s the advantage of using Lookup instead of Rollup?


They’re two different field types with their own pros and cons, but that’s a whole other topic altogether.



The advantage of a Lookup field in this instance is that looking-up up another Linked Record field will display the data in the typical clickable Linked Record bubble vs. the stripped-down/non-clickable string data that will come back in a Rollup field.



Difference






  • The Lookup displays the format I want here (clickable Linked Records), but has redundant values which are useless in this context.


    *The Rollup displays the data I want here (by using the “ARRAYUNIQUE(values)” function), but the data is just text and is not clickable/linked to the actual Linked Records.


  • What I want is elements of both; I want clickable Linked Records via the Lookup as this field currently allows, but I simply want an option to filter out duplicate Linked Records (basically the ability to apply the “ARRAYUNIQUE(values)” function here).




I’ve personally come across over a dozen use cases where I want this; conversely, I haven’t had a single use case where I actually wanted to display duplicate Linked Records.


@David_Krizan has there been any movement on this from Airtable since this discussion was last live?


@David_Krizan has there been any movement on this from Airtable since this discussion was last live?


Not as of yet. This has actually prevented me from using Airtable for a few use cases, so I really hope this common sense feature is added soon.


Hi David,


I did the Rollup + ArrayUnique{} and got text-only uniques as you pointed out. Then I changed the field type to Link Records and voila – the text now links.


I’ve tried this and the text does turn to linked records just as Lookups, and only the unique values remain - but in my case adding a new value that would cause another unique value to show does not work. The list of records is now static and not “rolled up” from existing records.



Really wish this was a feature. A simple toggle like it was proposed would be amazing.


Hi David,


I did the Rollup + ArrayUnique{} and got text-only uniques as you pointed out. Then I changed the field type to Link Records and voila – the text now links.


Agree with the Unique toggle feature, very important. Would be great to push for this, seems like a smiple win for both sides!


Here is a video I made demonstrating the Rollup feature that helps return only the unique results in Lookup: https://youtu.be/MiyQQxSx7iQ


Thanks to @David_Krizan for the solution.


+1 for this feature - also seems like a no brainer to only show a single linked record when doing a lookup (while preserving the interactivity of the link to that record)


I’ve hit this problem too - and also found that if the Roll Up field (ARRAYUNIQUE(values)) is referencing a Multi-Select field in another table, then it unfortunately fails to parse as expected and will return duplicate string data. I’m working on figuring out another parse of the data to clean it up. =/



I reported this to support today. How annoy.


Hey David,


I found a kinda “hacky” way to solve this with two Automations.


Step 1: Create a Linked Record Field


Step 2: Create the Rollup Field with ARRAYUNIQUE(values) as mentioned before


Step 3: Go to Automation Tab and hit new Automation


Setup as follows


Trigger:


“When record is created” →


Properties on the right:


Table: Select the table of the record


Add action:


“Update record” →


Properties on the right:


Table: Same as before


Record ID: Click the plus, select continue at “Record from step1” and select insert for “Airtable record ID”


Fields: Click “+ Choose field”, now choose the Linked Record Field you created at the beginning, now an empty bar with plus appears, click the plus and again select continue at “Record from step1” and select insert for the Rollup Field.


Now in the top left switch the button from “off” to “on”


Step 5: Repeat Step 3 but choose “When record is updated”


Done!


Now every time your record has a new Value in the Rollup Field it will get transported to the Linked Records field where the Records can be clicked and used as you like.


But it’s not instantaneous you have to wait a bit and it depends on your plan, how often you can trigger it… Pricing - Airtable




You could try using a Rollup field with the ARRAY_UNIQUE(values) Rollup function.


thank you, @Jeremy_Oglesby ! That’s exactly what I was looking for.


I think the following thread is essentially requesting this feature: Remove duplicates in look up field



I personally am trying to get a rollup of unique values, as the duplicates have no value as links. So, I’m essentially having to use a jury-rigged workaround similar to what @W_Vann_Hall is suggesting.



This is not my particular use case, but let’s use a simpler recipe example (I also posted this in a reply to the above link)…



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:




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):




+1 @David_Krizan. This would be such a simple solution. Any response from Airtable on it in the past 3.5 years?


Hey David,


I found a kinda “hacky” way to solve this with two Automations.


Step 1: Create a Linked Record Field


Step 2: Create the Rollup Field with ARRAYUNIQUE(values) as mentioned before


Step 3: Go to Automation Tab and hit new Automation


Setup as follows


Trigger:


“When record is created” →


Properties on the right:


Table: Select the table of the record


Add action:


“Update record” →


Properties on the right:


Table: Same as before


Record ID: Click the plus, select continue at “Record from step1” and select insert for “Airtable record ID”


Fields: Click “+ Choose field”, now choose the Linked Record Field you created at the beginning, now an empty bar with plus appears, click the plus and again select continue at “Record from step1” and select insert for the Rollup Field.


Now in the top left switch the button from “off” to “on”


Step 5: Repeat Step 3 but choose “When record is updated”


Done!


Now every time your record has a new Value in the Rollup Field it will get transported to the Linked Records field where the Records can be clicked and used as you like.


But it’s not instantaneous you have to wait a bit and it depends on your plan, how often you can trigger it… Pricing - Airtable




So useful! Thanks so much for this workaround! Works like a charm. 🙂


They’re two different field types with their own pros and cons, but that’s a whole other topic altogether.



The advantage of a Lookup field in this instance is that looking-up up another Linked Record field will display the data in the typical clickable Linked Record bubble vs. the stripped-down/non-clickable string data that will come back in a Rollup field.



Difference






  • The Lookup displays the format I want here (clickable Linked Records), but has redundant values which are useless in this context.


    *The Rollup displays the data I want here (by using the “ARRAYUNIQUE(values)” function), but the data is just text and is not clickable/linked to the actual Linked Records.


  • What I want is elements of both; I want clickable Linked Records via the Lookup as this field currently allows, but I simply want an option to filter out duplicate Linked Records (basically the ability to apply the “ARRAYUNIQUE(values)” function here).




I’ve personally come across over a dozen use cases where I want this; conversely, I haven’t had a single use case where I actually wanted to display duplicate Linked Records.


Hey mate - how would you join those two lookup fields to show unique values on the third column?

 

For e.g. Bacon, onion, meat, vegetables etc

 


Reply