Two 'finds' in filterbyformula API URL


#1

Hi there,

I’m a pretty novice developer so would appreciate any help here…

I am making API calls using AJAX and get URLs. I use this helpful tool a lot to help me write the URLs: https://codepen.io/airtable/full/rLKkYB?baseId=appSzxZJK94yvza3a&tableId=tblYFuqRveHg52vvb

My question is can I do two FIND formulas in one URL? I’m getting a 422 error in console, just trying to narrow down the problem here.

Example URL:
https://api.airtable.com/v0/appID/base?filterByFormula=(FIND(“player”,{players}))&filterByFormula=(FIND(“match”,{matches}))&fields…

What I’m trying to do / the problem:
In one base there are various amounts of players that have played various amounts of matches. Each record is a one match for a player. I am trying to dynamically return 1 specific record / match for a player. I need to tell the API which player and which match and after that there can only be one record - I just don’t know how to tell the API that…

Cheers,
Thomas.


#2

Think I worked this out:

Solution was to create an IF formula with two conditions e.g.

IF(AND({player}=“playerA”, {match}=“matchA”), 1, 0)

as per Matt Bush’s comment here: Two-Condition IF Formula