![clement_desrues clement_desrues](https://community.airtable.com/legacyfs/online/avatars/2X/e/e905cf98bc9889d48138784edaeb27588d8d6d7c.png)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 08, 2021 02:36 PM
Hello,
With the API custom with a filterbyformula, I would like to collect all record, corresponding to my needs, from two differents fields.
“Conversation?filterByFormula=%7Bexpediteur%7D%20%3D%20%27${user.email}%27”
Like, in this case i would like to get all records into “expediteur” field where {user.email} corresponding. But now in my case, I would like the same but into two fields. (expediteur & destinataire) is it possible ? And how to write that ? Thanks you
![kuovonne kuovonne](https://community.airtable.com/legacyfs/online/avatars/3X/b/c/bcecb2d58f8302e9d9f520621c02ff41be54488c.jpeg)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 08, 2021 03:20 PM
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.
![clement_desrues clement_desrues](https://community.airtable.com/legacyfs/online/avatars/2X/e/e905cf98bc9889d48138784edaeb27588d8d6d7c.png)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 09, 2021 01:17 AM
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” …
![kuovonne kuovonne](https://community.airtable.com/legacyfs/online/avatars/3X/b/c/bcecb2d58f8302e9d9f520621c02ff41be54488c.jpeg)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 09, 2021 07:06 AM
What do you want the formula to look like before url encoding?
![clement_desrues clement_desrues](https://community.airtable.com/legacyfs/online/avatars/2X/e/e905cf98bc9889d48138784edaeb27588d8d6d7c.png)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 09, 2021 08:00 AM
I would like to search the records where the fiels DESTINATAIRE or the field EXPEDITEUR is equal to the {user.email}.
![kuovonne kuovonne](https://community.airtable.com/legacyfs/online/avatars/3X/b/c/bcecb2d58f8302e9d9f520621c02ff41be54488c.jpeg)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 09, 2021 09:06 AM
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
![clement_desrues clement_desrues](https://community.airtable.com/legacyfs/online/avatars/2X/e/e905cf98bc9889d48138784edaeb27588d8d6d7c.png)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 10, 2021 08:48 AM
Thanks this is exactly what i need! Thank you
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 04, 2025 10:19 AM
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
}
![](/skins/images/FE00829FDD2AE889FAB731D8F02A8942/responsive_peak/images/icon_anonymous_message.png)