Skip to content
Back

Updating Rows in Table

  • 0
  • Databases
  • React Native
vl4do
27 Aug, 2025, 18:04

Im trying to update the rows in a table and im getting an error. This is the code, the error and the structure of my table in appwrite.

TL;DR
Developers discussing updating rows in a table, learning about promises and the `then` function. Solution: use `updateRow()` instead of upserting. Check the Appwrite documentation for more information and clarity.
vl4do
27 Aug, 2025, 18:11

this is the type of the item

vl4do
27 Aug, 2025, 18:12

since this is a function which gets an object as an argument and changes the completed attribute

Steven
27 Aug, 2025, 18:13

why are you upserting and not using updateRow()?

vl4do
27 Aug, 2025, 18:13

thats what i saw in the docs

Steven
27 Aug, 2025, 18:14

what docs and do you understand the difference?

vl4do
27 Aug, 2025, 18:14

seems like i dont

vl4do
27 Aug, 2025, 18:14

sorry, im new to appwrite and databases in general

vl4do
27 Aug, 2025, 18:15

i changed it to updateRow and it still doesnt work

Mr. Afonso
27 Aug, 2025, 18:15

upsert updates a row if it exists, otherwise it inserts it

vl4do
27 Aug, 2025, 18:16

thanks

Steven
27 Aug, 2025, 18:16

does this row exist already in the DB? Does the user have access to it?

vl4do
27 Aug, 2025, 18:16

yes it exists

Steven
27 Aug, 2025, 18:16

hmm the docs should include update row too

vl4do
27 Aug, 2025, 18:16

now the the console logs the row

vl4do
27 Aug, 2025, 18:16

and its with its new completed value

vl4do
27 Aug, 2025, 18:18

thanks guys its working now, what am i supposed to do in the .then function?

vl4do
27 Aug, 2025, 18:18

if i dont want to log anything

Steven
27 Aug, 2025, 18:41

then don't have console.log()

Steven
27 Aug, 2025, 18:42

you might want to learn a bit about promises so you understand what then does.

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