Well i think i found your own post (i answered you in another old post).
Ok, what we have here?
First of all to say → with such a CHAOTIC CODE-FORMAT you always will get errors and issues.
First let us to use the right CODING-FORMAT to bring more structure into it…
$w.onReady( () => {
$w("#myDataset").onReady(() => {
$w('#text125').value = $w("#myDataset").getCurrentItem().fieldName;
if ($w('#text125').value === 'Yes') { $w('#button28').enable();}
else{ $w('#button28').disable(); }
});
});
Ok, this one already looks much better.
Ok, now doing some ANALYSIS and invastigating the code… (green=good)
$w.onReady(()=>{
$w("#myDataset").onReady(()=>{
$w('#text125').value = $w("#myDataset").getCurrentItem().fieldName;
if ($w('#text125').value === 'Yes') { $w('#button28').enable();}
else{ $w('#button28').disable(); }
});
});
Is this our bug?
$w('#text125').value = $w("#myDataset").getCurrentItem().fieldName;
Let’s see…
A TEXT-element has no —> VLAUE (it has just txt or html)
And what are you trying to do here?
First getting some results out of DB and putting them into a text and then doing an if-else-query to get another end-function?
Perhaps you wanted to do this one…
let myData = $w("#myDataset").getCurrentItem().fieldName; console.log(myData)
if (myData === 'Yes') {$w('#button28').enable();}
else{ $w('#button28').disable(); }