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
- The current user is not authorized to pe...
I want to create a document associated with user after log in with OAuth. The user were logged in, but Appwrite said user is unauthorized. User is logged in wi...
- My account is blocked so please check an...
My account is blocked so please unblock my account because all the apps are closed due to which it is causing a lot of problems
- Applying free credits on Github Student ...
So this post is kind of related to my old post where i was charged 15usd by mistake. This happens when you are trying to apply free credits you got from somewh...