First build your formula in the Airtable user interface. You will probably need to use the AND()
or OR()
function in your formula to combine the conditions. Once you have a working formula, the rest is string manipulation.
First build your formula in the Airtable user interface. You will probably need to use the AND()
or OR()
function in your formula to combine the conditions. Once you have a working formula, the rest is string manipulation.
This is not exactly what I need. Actually, i want to add another field into my API. I don’t know how to add another field next to “expediteur” …
What do you want the formula to look like before url encoding?
What do you want the formula to look like before url encoding?
I would like to search the records where the fiels DESTINATAIRE or the field EXPEDITEUR is equal to the {user.email}.
You cannot simply add a new field name to the filterByFormula value. You need to construct a valid Airtable formula.
For example, if the email is me@example.com, your formula before url encoding would need to look like
OR(
{DESTINATAIRE} = "me@example.com",
{EXPEDITEUR} = "me@example.com"
)
Once you remove white space you would have …
OR({DESTINATAIRE}="me@example.com",{EXPEDITEUR}="me@example.com")
After url encoding you would have …
OR%28%7BDESTINATAIRE%7D%3D%22me%40example.com%22%2C%7BEXPEDITEUR%7D%3D%22me%40example.com%22%29
You cannot simply add a new field name to the filterByFormula value. You need to construct a valid Airtable formula.
For example, if the email is me@example.com, your formula before url encoding would need to look like
OR(
{DESTINATAIRE} = "me@example.com",
{EXPEDITEUR} = "me@example.com"
)
Once you remove white space you would have …
OR({DESTINATAIRE}="me@example.com",{EXPEDITEUR}="me@example.com")
After url encoding you would have …
OR%28%7BDESTINATAIRE%7D%3D%22me%40example.com%22%2C%7BEXPEDITEUR%7D%3D%22me%40example.com%22%29
Thanks this is exactly what i need! Thank you
I was having a heck of a time with this one. Realized afterwards that it won't let you filter out to receive only specific fields in the response.
params = {
'fields': 'imgid',
'filterByFormula': filter_formula,
'maxRecords': 1
}
That did not work, but this did
params = {
'filterByFormula': filter_formula,
'maxRecords': 1
}