Help

Formula search from a script?

Topic Labels: Scripting
294 2
cancel
Showing results for 
Search instead for 
Did you mean: 
DanaBergen
4 - Data Explorer
4 - Data Explorer

I have an automation script that searches a table for a matching record. Based on the examples I could find, I wrote it to retrieve that column from all the rows using selectRecordsAsync(), and then loop through all the rows looking for a match. But this sometimes times out after 30 seconds. The table has about 1800 rows.

Is there some way from a script to get the lookup done on the server side, e.g. by passing in a formula? I was able to do this easily in make.com using the airtable search action and a formula, but it seems like there should be a way to do this in airtable itself.  

2 Replies 2

Try doing an API call via the script action maybe?  Note that this would expose your API key

I'm curious why we'd want to do the Find with a script though?  Is it possible for us to use a Find Record action and pass the results to the script instead?

Oh, that totally makes sense to use the Find Record action first. I'm more experienced with scripting in general than I am with airtable automations, so when I couldn't do what I wanted with the provided actions I figured I needed to do the whole automation with a script. It didn't occur to me to only do part of it with a script, but I expect that would solve this problem. Thanks.