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?
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
[TableB] where the field you wish to look up is a linked records field connecting to
[TableC]. In doing so, you want to be able to click on a returned value and have the corresponding record in
[TableC] 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:
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
[TableC]. 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.
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
[TableC]. 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
[Documentation] 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 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:
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”.
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):
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…
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).
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.
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.
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.