I’m try to count how many click on the data
My database called “NewCollectionName”
the counter field called “NOC” // number of click
import wixData from ‘wix-data’;
export function text2_click(event, $w) {
wixData.query(“NewCollectionName”).eq(‘Title’,$w(‘#text2’).text).find().then((result) => {
let answersitem = result.items[0];
let id = answersitem._id;
answersitem.Noc++;
wixData.update(“NewCollectionName”,answersitem).then(()=>{
$w(‘#dataset2’).refresh();
});
})
}