Hi, I need help. I’d like to count in my column the total unique questions. I wanted to use this function, but this help me only if I want to get all counts from my collection. As I said how to count the data in the fieldkey? Any help.
This code works only for all count data in my collection
function count() {
wixData.query("All_Questions")
.count()
.then ((result) => {
console.log("Total COUNT ALL QUESTIONS:");
console.log (result)
let total = result
if (total > 0) {
$w('#textCount').text = `${total} result has found.`;
$w('#total').value = total;
} else {
$w('#textCount').text = "No result found!";
}
})
}
})