What does this error means ??
final businessDatabyIDResponse = await _db.listDocuments( databaseId: AppwriteConstants.databaseID, collectionId: AppwriteConstants.businessInfoCollections, queries: [Query.equal('business_owner_id', myBusinessDetailsId)], );
my code
Its resolved now i need to write myBusinessDetailsId like [myBusinessDetailsId]
Not working
what is not working ?
final businessDatabyIDResponse = await _db.listDocuments( databaseId: AppwriteConstants.databaseID, collectionId: AppwriteConstants.businessInfoCollections, queries: [Query.equal('business_owner_id', myBusinessDetailsId)], );
This code
Alright make sure you have setup the permissions correctly for the collection in appwrite console
im trying to fetch data where business_owner_id = 'someownerid from auth users'
Is it correct ?
Yes this means users have the access
can you pls send the error message
Its in the subject 400 generak_argument_invalid, index not found:business_owner_id
You are using appwrite cloud right ?
yes
ok so i think you need to create an index go to the index tab and create an index for business_owner_id field
why ?
In order to do queries you need to create index
You can learn more about them here https://appwrite.io/docs/databases#indexes
Recommended threads
- Apple OAuth Scopes
Hi Hi, I've configured sign in with apple and this is the response i'm getting from apple once i've signed in. I cant find anywhere I set scopes. I remember se...
- Sign In With Apple OAuth Help
Hi All! I've got a flutter & appwrite app which Im trying to use sign in with apple for. I already have sign in with google working and the function is the sam...
- [SOLVED] OAuth With Google & Flutter
Hi all, I'm trying to sign in with google and it all goes swimmingly until the call back. I get a new user created on the appwrite dashboard however the flutte...