Hello there,
I'm having what is probably a dumb issue but I haven't been able to figure out what I did wrong:
When using the listDocuments function, I'm able to get all documents from a specific collection, but when I add a query no element is returned. I did check that the value was correct both in the database and the code and I'm guessing I just didn't set-up something properly but I'm just lost right now. I did try to change the index type but no success.
I joined some pictures of the code and the collection setup. Hopefully someone can help me find my missing brain cell ❤️
That seems like it should work.
Can you try it one time like this?
queries: [
Query.equal("phone_number", [phoneNumber])
]
Thank you for the suggestion, I did try it before and just re-did it again, but I still have 0 documents returned. 😦 Without the query, my total is 4 as expected, but when added, it's 0. And I can't even count how many times I made sure the value in the query and in the user database phone_number field were identical.
what did the query print output?
equal("phone_number", ["string"])
With string being a value that matches the value set in the user present in the collection for the field "phone_number". No whitespace or anything, either from the mobile app or on the database.
Note that this output with the string being in an array is the same wether I put the value in an array myself or not.
Ho wow I actually just found the issue, maybe I should have started with that: It's not working with the character "+" in the string.
"+3312345678" in the database and the query -> No results "3312345678" in the database and the query -> 1 Result as expected
Not sure where the issue happens here
This is interesting
Are you running against the cloud or a self-hosted Appwrite instance?
All on the cloud for now, I'm just trying out stuff and seeing how this SDK works so no fancy stuff 😄
so i was able to reproduce this on cloud...but not on my local instance (essentially, 1.3.7). I can't see how/where the query value is being modified in the cloud version..
I guess that at least eliminates a possible parameter encoding issue from the iOS SDK then
Recommended threads
- Function connected custom domain error: ...
My domain is served through Cloudflare. Domain is now connected with the appwrite function. But when accessing the domain, I get the below error. Any suggestion...
- Error | general_unknown
I have built a website using Appwrite Cloud as backend, and also using sites for deployment. My website is live but sometimes it shows Appwrite's Error general_...
- Introducing new string column types made...
Adding new string types is hugely bennificial! Unfortunately it made the current column types not editable to change their types to the new longer field types.