Answers for "update row in wix dataset"

1

how can I update a row in wix dataset

//name of database = "stuff"
//row ID = <record id>

wixData.get("Stuff", <record id>)
.then((toUpdate) => {
   toUpdate.fld = "x";
   wixData.update("Stuff", toUpdate)
   .then((result) => {
      // updated object returned so let's take a look
      console.log(result);
   })
   .catch((err) => {
      let errorMsg = err;
   });
})
.catch((err) => {
   let errorMsg = err;
});
Posted by: Guest on July-03-2020

Browse Popular Code Answers by Language