Hello!
I´m trying to get a result from a database but I need just one valuer of the column that represent the codes (its the first colum). I need to “filter” just one value (column code) and put this value in the #text11 field. So, my code is:
import wixData from ‘wix-data’;
export function button1_click(event, $w) {
wixData.query(“BaseRV”)
.limit(1)
.find()
.then((results) => {
let random = (Math.floor((Math.random() * 40) + 1));
let items = results.items[random];
$w(“#text11”).text = ??? <== this is my question
})
.catch((err) => {
let errorMsg = err;
console.log(errorMsg);
});
}
Thanks in advance!