Data set query returns no data

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?


import wixData from "wix-data";

$w.onReady(function () { 
     create_Tables()
     $w('#button1').onClick(()=>{
          query_Data()
     })
})


function create_Tables(){
    $w("#table1").columns = [
      {
 "id": "col1",       
 "dataPath": "_createdDate", 
 "label": "Application Date", 
 "width": 100,       
 "type": "date",   
      },
      {
 "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",
      }];
}


function query_Data(){
  wixData.query("Applications")
  .contains("applicantEmail", $w("#input1").value)
  .find()
  .then(res => {     
    console.log(res)
    $w("#table1").rows = res.items; 
    $w("#table1").expand(), $w("#table1").show()
   });
}

Thanks, however the issue was resolved by syncing the data from live to sandbox and back again, not sure why it now works.