
but you can't show it without a known id

as i said when you're showing data, use the document id

make a list or something that stores the ids of all the documents for that user

then use the correct id from the list to show the data

and update

I don't quite understand, but I'll try to do something 馃槄

okay how do you plan on display data?

where will you get the data from?

from the database 馃槄

I will show you


exactly

you're fetching the data from the database

Yeah

and to pinpoint which document you're fetching, you're using documentId right?

Yes

I just made data write, I don't know how to read data withou document id

Consider the collection and documents permissions. If using documents permission, appwrite will only return the documents that the user has read permissions for, then you could use databases.listDocuments if it returns empty then there is no document for that user, it would display the option to register. If it returned items, it would display on the screen and have the information to update

it's more clear to me. And how can I specify that I need to display text from a document that contains name: Max, for example, thanks

add an index for the field.
then
databases.listDocuments(
databaseId: databaseId, collectionId: collectionId, queries: [Query.search('you_field', 'Max')]);

Thanks

@Chewbacca Do you have any more questions? could you mark it as solved?

No, I don`t. I forgot to add SOLVED, thanks

[SOLVED] CRUD question (Flutter)

I resolve that problem with a ternary operator. For example if you a fetching a list, if it's empty a text : no documents now, and if it's has items you diplay it. somelist.isempty ? Text('No elements) : list(), and you must manage state with state manager o with reactive code
Recommended threads
- 503 Timeout when Updating or Upserting D...
Hey I鈥檓 running into an issue when trying to update or upsert a row in Appwrite. The request hangs for a while and then throws this error: ``` AppwriteException...
- Hola equipo de soporte,
Hola equipo de soporte, Estoy desarrollando una Function en Appwrite Cloud con Node.js 22 y el siguiente package.json: {聽聽"name":聽"upload-whitelist",聽聽"type"...
- Sites 30MB limit from GitHub
I鈥檓 deploying a site from github as Other type on the Hobby plan. It is actually a Flutter web app but it鈥檚 in a subdirectory with the root being an html landin...
