Help

i need to filter the results of a rest api request by using a specific field containing strings

Topic Labels: API
Solved
Jump to Solution
1320 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Ramirez
5 - Automation Enthusiast
5 - Automation Enthusiast

Im trying to filter the next api request: 

https://api.airtable.com/v0/appn8Dg5iLM042oZh/tblDamHA046rqdTJF?fields%5B%5D=client_address_(from_deal_id)&fields%5B%5D=client_name_(from_deal_id)&filterByFormula=assignee%3D+9650 

but instead of the assignee being 9650 i need to filter it by names like "Nick Smith", how could i do it?

The error i get when i try to put a string instead of a number like:

https://api.airtable.com/v0/appn8Dg5iLM042oZh/tblDamHA046rqdTJF?fields%5B%5D=client_address_(from_deal_id)&fields%5B%5D=client_name_(from_deal_id)&filterByFormula=assignee%3D+samantha 

is: 

"error": {
        "type": "INVALID_FILTER_BY_FORMULA",
        "message": "The formula for filtering records is invalid: Unknown field names: samantha"
    }
1 Solution

Accepted Solutions
Ramirez
5 - Automation Enthusiast
5 - Automation Enthusiast

Solution:

https://api.airtable.com/v0/appn8Dg5iLM042oZh/tblDamHA046rqdTJF?fields%5B%5D=client_address_(from_deal_id)&fields%5B%5D=client_name_(from_deal_id)&filterByFormula=SEARCH ("Samantha", ARRAYJOIN(assignee))

assignee is a lookup field thats why it is a ARRAYJOIN, and it also works with full names with spaces like "Nick Smith"

See Solution in Thread

1 Reply 1
Ramirez
5 - Automation Enthusiast
5 - Automation Enthusiast

Solution:

https://api.airtable.com/v0/appn8Dg5iLM042oZh/tblDamHA046rqdTJF?fields%5B%5D=client_address_(from_deal_id)&fields%5B%5D=client_name_(from_deal_id)&filterByFormula=SEARCH ("Samantha", ARRAYJOIN(assignee))

assignee is a lookup field thats why it is a ARRAYJOIN, and it also works with full names with spaces like "Nick Smith"