@qvelo78
Ok, now your setup is clear.
You have a dynamic-page (connected with a dataset).
You will need → getCurrentItem() ←
to get the data of the current item including all DB-values.
So how to do? How to write the code?
$w.onReady(()=>{
$w(‘#elementID’).onClick(()=>{
let myItem=$w(‘#dataset’).getCurrentItem().then(()=>{console.log(myItem);
//the rest of your code here…
console.log(myItem.title);
console.log(myItem.stock);
//changing stock-status…
myItem.stock=false;
console.log("stock-status after change ", myItem.stock);
});
});
});