You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Encountered this issue while trying to use this regex to compare hostnames of a URL inside a Base.
(String literal after being properly encoded behaves as expected when submitted as normal HTTP query parameter)
// ...filterByFormula:
`REGEX_EXTRACT({Website},'^(?:https?:\\/\\/)?(?:[^./]+\\.)?([^/]+\\.[^./]+)')='duck.com'`,//.../** * Returns: * AirtableError { * error: 'INVALID_FILTER_BY_FORMULA', * message: 'The formula for filtering records is invalid: Invalid formula. Please check your formula text.', * statusCode: 422 * } */
Issue
Formula functions are used and passed by the airtable.js client as an HTTP query param. Regex functions such as REGEX_EXTRACT() that are used as a value for the FilterByFormula field in CRUD operations are not passed correctly to the Airtable endpoint due to the limits of the encodeURIComponent() method:
Discovery
Encountered this issue while trying to use this regex to compare hostnames of a URL inside a Base.
(String literal after being properly encoded behaves as expected when submitted as normal HTTP query parameter)
Issue
Formula functions are used and passed by the airtable.js client as an HTTP query param. Regex functions such as REGEX_EXTRACT() that are used as a value for the FilterByFormula field in CRUD operations are not passed correctly to the Airtable endpoint due to the limits of the encodeURIComponent() method:
airtable.js/src/object_to_query_param_string.ts
Line 44 in 2d36eb6
Additional parsing is required to properly translate regex to the endpoint.
The Issue can be fixed by extending the default URI encoding characters to include ["!", "'", "(", ")"]
Comment
**EDIT**
moved .replace() function to return statement
The text was updated successfully, but these errors were encountered: