Boolean value of a dataset shows a button

Hello,

First of all, I’m French so I apologize for my bad English.

I would like to make sure that if the boolean value of the dataset is true (b1) it shows the button (# button5) but I can’t …

So I would like someone to help me.

Thank you,
ThommyGames06

Please post your code.

Yes. here is my code

import wixData from 'wix-data';

wixData.query("Properties")
        .find()
        .then((results) => {
 
 let boolean = results.items[0].b1;
 if (boolean === true) {
                $w("#button5").show();
            } else {
                $w("#button5").hide();
            }
        })

Your code is fine. So the problem is somewhere else. Maybe the data is wrong, or the collection permissions.

@jonatandor35 ok thanks, i will check

@thommygames06 +put everything (except for the import line) inside:

$w.onReady(() => {
//here
})

@jonatandor35 ok thanks