I'm using Filemaker API and PHP and Postman to test it. In Postman (and my PHP project) whenever I try to find a record by an email field it returns an error and doesn't find the record if there is a @
symbol in the query. For example:
{
"query":[
{"Contact_Email": "john.smith@gmail.com"}]
}
This will return:
{
"errorMessage": "No records match the request",
"errorCode": "401"
}
But this request:
{
"query":[
{"Contact_Email": "john.smith"}]
}
Will return the record I am looking for.
What is the issue here? Do I need to escape the @
symbol? Is this a FileMaker API issue, or something else?
The @ sign is reserved as an operator within the FM DB engine, so most likely it's bumping heads with that. I'm not sure how to escape it via API, but either testing actually including the quotes as part of the search string should put you on the path...
{
"query":[
{"Contact_Email": "\"john.smith@gmail.com\""}]
}
or maybe including an equals sign as part of the query:
{
"query":[
{"Contact_Email": "=john.smith@gmail.com"}]
}
or maybe try \ escaping the @:
{
"query":[
{"Contact_Email": "john.smith\@gmail.com"}]
}