Help

Re: Compare a linked field with a lookup field

928 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Dirk_Jan_de_Wit
6 - Interface Innovator
6 - Interface Innovator

I’ve a linked field that I want to compare to a lookup field. If any of the linked records in the linked field appears in the Lookup field I want to generate an error of some kind.

Linked field: Wishlist (Internal) (link to toy table)
Lookup field: Toys (lookup toy table)
Formula that I used: IF(FIND({Wishlist (Internal)},{Toys})<2, “ :white_check_mark: Wishlist updated​:white_check_mark:”, “ :stop_sign: Wishlist has given toys​:stop_sign:”)

It works if there’s only 1 linked record in the “Wishlist (Internal)” But it doesn’t work for multiple records. Is there any other way to do this?

Screenshot 2020-07-20 at 2.39.05 PM

1 Reply 1

Not natively in Airtable’s formula field. It currently lacks the ability to iterate through a collection (e.g. multiple linked records) and perform some operation on each item in that collection (e.g. look for that same item in a collection in another field). To do this, you would need to either write custom code that accesses the data via Airtable’s REST API, or use a script in the scripting block. In either case, you’ll be using a scripting/programming language with far more robust capabilities for dealing with arrays (collections of items). Let us know which way you wish to go, and we’ll do our best to help.