Hey guys got this piece of code
$w('#ddFrame').onChange((event)=>{
let options = [ ]
console.log($w('#ddFrame').value)
wixData.query("Students").contains("frame", $w('#ddFrame').value)
.distinct("firstName",)
.then((results) => {
options =results.items.map(item => {
return {
label: item,
value: item
}
})
$w('#ddStudents').options = options
console.log(results)
console.log(options)
})
$w('#ddStudents').enable()
})//onChange
i’m trying to make drop down #ddStudents show their first and last name. in this state i got only the first name. tried many things, i guess it’s pretty simple but i newb in query