GV14982 / async-airtable

A lightweight npm package to handle working with the Airtable API.
https://www.npmjs.com/package/asyncairtable
MIT License
54 stars 5 forks source link

Regex FilterByFormula in Select Options not Working #67

Closed anthonygualandri closed 3 years ago

anthonygualandri commented 3 years ago

Describe the bug When I try and use a regex formula filter per Airtable's supported formula elements I get no records back. Just wanting to confirm whether or not AsyncAirtable allows for the regex formula to be included in the filterByFormula field for select options before I try and debug my code any further. Thanks!

To Reproduce Steps to reproduce the behavior:

const selectOptions = { fields: ['Name', 'Region'], filterByFormula: REGEX_MATCH(ARRAYJOIN({Teachers}, ", "), "${userName}") }

GV14982 commented 3 years ago

Hi, sorry for the delay in response, let me give this a test to be sure, but all I do is URIencode that string and slap it into a query param when I make the API request to airtable, so it should work. I'll take a look and get back to you.

GV14982 commented 3 years ago

Hey there, so I pushed this into the next branch. Can you install asyncairtable@next and let me know if you're still having this issue?

GV14982 commented 3 years ago

Hey there @anthonygualandri have you had a chance to test this on the @next branch? Just want to be sure it's working before I merge into main.