Help

Re: Way to Bulk Search IDs?

Solved
Jump to Solution
2426 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Leslie_Engel
6 - Interface Innovator
6 - Interface Innovator

Hello Airtable Community,

I have a large base of recipes, each with a unique ID. I would like to be able to do a bulk search for several IDs at once, but I have not been able to find a way to do this. Is this even possible in Airtable, or do I need to search for each ID individually?

Thank you!

Leslie

1 Solution

Accepted Solutions

Using your example, it sounds like you want to do a “find and replace”, which isn’t supported in Airtable and would require a custom JavaScript to replace some of your onion references with shallots.

But you might be able to do this with Airtable’s Batch Update block, if your tables are setup the right way.

Either way, the first step is getting a view that only contains your 45 records that you want to replace. Since those 45 records have nothing in common with each other, you will manually need to filter your list down to those 45 records.

I think that your best bet might be to simply add a checkbox field to your table, so you can quickly just scroll through your list and check off the records that are going to need replacing.

Once you’ve checked off your 45 records, you could either filter your current view or create a new filtered view that is based on those checkboxes.

From there, you can run your JavaScript to do a “find & replace” for the values that you’re looking for.

Or, instead of writing a JavaScript, Airtable actually has a Batch Update block, BUT that block completely overwrites entire cells with new data… it doesn’t do a “find and replace” of existing data.

So, assuming that you have a recipes table linked to an “ingredients per recipe” table, you could filter your records from the “ingredients per recipe” table (instead of the “recipes” table) and then run this Batch Update block from there. That would do the trick, without needing a JavaScript. But running this Batch Update wouldn’t work from the recipes table.

See Solution in Thread

9 Replies 9

The way to do this in Airtable would be to setup a “filter” for your view with multiple different criteria.

Also, I really like Airtable’s Search Block a lot. It does NOT let you search on more than one specified criteria at a time (e.g. you CAN’T search for 2 different IDs at the same time), but the Search Block is so incredibly easy to use & so incredibly easy to search with (especially if you keep it always visible at all times), that it’s super quick to just type an ID in there and then instantly see all of your results. It’s much quicker than modifying your filter every time.

Thank you for your reply! Unfortunately, I don’t think a filter will work in my situation. I have TONS (nearly a thousand) recipes in this base, all with different ingredients, cuisines, etc. The IDs I need to bulk search often are so disparate in terms of those features that using a filter doesn’t really work.

It would be awesome if AIrtable had a more robust search feature that allowed for searching on more than one ID at a time.

You would probably need to turn to JavaScript to do this by using the Scripting Block. I don’t know Javascript, but there are other people here who do!

Can you give specific examples of the searches that you would like to do? What are your IDs and how do you want to bulk search on them?

One option is to use a formula field for your search criteria and then do a filter on that formula field.
A formula field is capable of combining and conditions with or conditions and comparing values across multiple fields. It may take a while to get accustomed to writing formula fields, but the more you write, the easier it gets.

Here’s a possible example of a search I’d like to do:

I have stir-fry 100 recipes that share one common ingredient, let’s say onions. They all have different, non-sequential IDs (since the recipes were all created at different times). Today I want to change a subset of those onion stir-fry recipes (let’s say 45) to use shallots instead of onions in the recipe. I have the IDs and would like to search for all 45 recipes at once, rather than individually, so I can then make a batch change to the ingredients (onion to shallot). Keep in mind, I have other recipes (aside from stir-fries) with onions.

I’m not well-versed in Airtable formulas, so I’m not entirely sure how that would work in this scenario.

Using your example, it sounds like you want to do a “find and replace”, which isn’t supported in Airtable and would require a custom JavaScript to replace some of your onion references with shallots.

But you might be able to do this with Airtable’s Batch Update block, if your tables are setup the right way.

Either way, the first step is getting a view that only contains your 45 records that you want to replace. Since those 45 records have nothing in common with each other, you will manually need to filter your list down to those 45 records.

I think that your best bet might be to simply add a checkbox field to your table, so you can quickly just scroll through your list and check off the records that are going to need replacing.

Once you’ve checked off your 45 records, you could either filter your current view or create a new filtered view that is based on those checkboxes.

From there, you can run your JavaScript to do a “find & replace” for the values that you’re looking for.

Or, instead of writing a JavaScript, Airtable actually has a Batch Update block, BUT that block completely overwrites entire cells with new data… it doesn’t do a “find and replace” of existing data.

So, assuming that you have a recipes table linked to an “ingredients per recipe” table, you could filter your records from the “ingredients per recipe” table (instead of the “recipes” table) and then run this Batch Update block from there. That would do the trick, without needing a JavaScript. But running this Batch Update wouldn’t work from the recipes table.

Thanks for the detailed example.

Based on your example, it really seems like filtering will provide the functionality you are looking for. Airtable is capable of filtering thousands of records quite easily, and filters can consider values in multiple fields.

I am assuming that each record is one recipe. Each recipe has a {recipe type} field and an {ingredients} field, and some other fields.

Create a new view, and filter the view for {recipe type} to contain “stir-fry” and {ingredients} to contain “onion”.

Depending on the field types, the exact type of filtering might be “contains” or “is any of”.

The view will then contain all stir-fry recipes with onions and no other recipes. You will still have to manually change the ingredients, as “onions” is probably part of a text field that list all ingredients.

When you want to search for a different subset of recipes, change the filtering for the view. You may want to give the view a name, such as “custom search – edit filters”.

Thank you! This is basically what I’ve been doing. I was hoping for a shortcut of some kind without having to use filters, but it sounds like this may be my only option!

Thank you for thinking through this! I think due to the complexity of my base filtering and manually changing the ingredients might be my only option (and I don’t have the expertise to get into JavaScript!).