I’ve followed the example, here , I’m querying a collection based on the email address entered into a text box.
the code is:
import wixData from “wix-data” ;
export function button1_click(event) {
wixData.query( “Applications” )
.contains( “applicantEmail” , $w( “#input1” ).value)
.find()
.then(res => {
$w( “#table1” ).rows = res.items;
$w( “#table1” ).expand();
});
}
$w.onReady( function () {
$w( “#table1” ).columns = [
{
“id” : “col1” , // ID of the column for code purposes
// The field key in the collection whose data this column displays
“dataPath” : “_createdDate” ,
“label” : “Application Date” , // The column header
“width” : 100 , // Column width
“type” : “date” , // Data type for the column
},
{
“id” : “col2” ,
“dataPath” : “applicantName” ,
“label” : “Applicant Name” ,
“visible” : true ,
“type” : “text” ,
}, //,
{
“id” : “col3” ,
“dataPath” : “Fund” ,
“label” : “Fund” ,
“visible” : true ,
“type” : “text” ,
},
{
“id” : “col4” ,
“dataPath” : “applicationAmount” ,
“label” : “Applicant Amount” ,
“visible” : true ,
“type” : “number” ,
},
{
“id” : “col5” ,
“dataPath” : “status” ,
“label” : “Applicant Status” ,
“visible” : true ,
“type” : “text” ,
}];
});
When I run the query, it creates the table but contains no data, there are over 40 submissions in the table with the email address i’m using to query
Any ideas?