Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Mar 20, 2024 12:08 AM
Hi there,
here is my cURL as mentioned in the title i'm having issues just on iOS while on Android it works with no problem.
https://api.airtable.com/v0/appOwBv51ihqo****/TableName?filterByFormula=FIND("february",{Mese%20Nome})=1&sort%5B0%5D%5Bfield%5D=Created&sort%5B0%5D%5Bdirection%5D=desc
Status: 422
Error: undefined
I'm really confused, hope you can help
Mar 20, 2024 12:22 AM
I also tried the API call in Postman, and it works great
Mar 20, 2024 12:52 AM
edit:
Error 422: "the formula for filtering records is invalid: Uknwon field names: mese%20nome
As you can see from the link above, i specify “Mese%20Nome” (first capital letters) as field, and it actually exists in Airtable.
I think it’s iOS that automatically changes this field to lowercase letters and it won’t help me to go through (it recognizes “mese%20nome” and not “Mese%20Nome”).
I tried to force capital letter using “uppercase” but it didn’t work.
The tablename has also its capital letters but it seems not to be a problem
Please tell me there is a smart solution, changing all the tables/fields and all the code in lowercase letters will take me at least 4 weeks of pure stress.
I hope you can help,
thank you very much.
Mar 20, 2024 03:25 AM
Hm, long shot, but could you try URL encoding your "{" and "}" as well?
Mar 20, 2024 03:48 AM
Sorry, i think i didn't understand.
You mean to swap the "&" and put "and" instead?
Thank you for your help
Mar 20, 2024 04:13 AM
Ah, no, I meant to try the URL with everything URL encoded, so your "{" would be "%7B" and the "}" would be "%7D". I just noticed the "()" and "=" need to be encoded too, so it'd be:
https://api.airtable.com/v0/appOwBv51ihqo****/TableName?filterByFormula=FIND%28%22february%22%2C%7BMese%2520Nome%7D%29%3D1&sort%5B0%5D%5Bfield%5D=Created&sort%5B0%5D%5Bdirection%5D=desc
Worth a shot!
Mar 20, 2024 04:45 AM
i tried this, which includes all the correct value apart from the app ID, but it gives me the same error.
To be fair now, with this code it's giving me the same error on Android too (it wasn't happening before)
Mar 23, 2024 01:18 AM
kinda found the issue, it' in the filterByFormula.
Android reads properl {Mese%20Nome}, while iOS only read {Mese+Nome}.