Update to Data without all fields

I have a database with a lot of fields. When a visitor changes an input on my site, it needs to be updated in the database. It is not a dynamic page and I don’t have a dataset on my page. The only thing I have is the ID of the item that needs to be updated.

When I use wixData.update I need to name every field in the database otherwise I will update to a blank field. Is there another way to update just one field in a database with just knowing the item ID?

Thanks in advance!

You can use

wixData.get("CollcetionName", id)
.then(item => {
//change the fields you want to change for example:
item.price = 500;
item.stauts = "avialable";
return wixData.update("CollcetionName", item);
}).then(() => console.log("done")).catch(err => err);

It worked!

Thanks for helping me out!

You’re welcome :slight_smile: