Back

[SOLVED] Update Array String not work

  • 0
  • Self Hosted
  • Flutter
hortigado
12 Jul, 2023, 16:49

Hello, I have an field type array string where I store the ids of the child documents. The problem is that more than one item cannot be added, when I update the document adding the other id it is not saved in the cloud. I am sending the data through REST API in the image you can see the straws attribute with 3 ids but only the first one is saved in the cloud

TL;DR
The user was experiencing trouble with updating an array string field in their document. Another user helped them identify the issue - they were wrongly using the 'documentId' field when updating documents. This caused the update to fail, but no error was displayed. The solution was to only use the 'documentId' field when inserting documents. The user was asked to share the request they were using to update the document.
Binyamin
12 Jul, 2023, 16:54

How are you updating the document? Can you share the request

hortigado
12 Jul, 2023, 17:00

@Binyamin haha I was about to send you and I found the error I was sending the **documentId **field when inserting and updating the document when it should only be used when inserting. For this reason the update was not saved, my mistake. But for some reason it didn't give me an error.

hortigado
12 Jul, 2023, 17:03

[SOLVED] Update Array String not work

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more