Help

Formula to Compare Array Elements on Query

Topic Labels: API
1355 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Patrick_Luy
5 - Automation Enthusiast
5 - Automation Enthusiast

So, I need to query AirTable in my Node app to only return records that match a given field value.

My query looks kind of like this:

await base(baseName).select({
fields: […],
maxRecords: 100,
filterByFormula: “?”
});

Here’s the catch. In the filterByFormula parameter, I need to query a field, status, that is a lookup to another table field. In the other table field, the data type of status is a single-select dropdown. However, in the API for the table I’m querying, the return type is “array of strings”, where the array of strings contains the values of the field (which is weird because I thought it was a single selection drop down).

So, I’m kind of unsure how to go about querying this. Say, the possible values for status are [“pending”, “confirmed”, “canceled”, “completed”]. How would I go about filtering the results to only return records who’s linked status value is “pending”, for example?

Really new to AirTable. I’ve honestly just been learning as I go during this little freelance task I took on last week. Lol. So, appreciate the help.

0 Replies 0