Disable button if it's empty on database

@vuerarealestate You want to check for the myData variable (pricelist) being undefined. You would do that like this:

$w.onReady(()=>{
  $w("#dataset1").onReady(()=>{
    let myData=$w("#dataset1").getCurrentItem().pricelist;
    console.log(myData)
    if (myData){
      $w('#button7').enable(); 
    } else {
       $w('#button7').disable();
    }
  });
});
1 Like