Filtering results when boolean value is false

Hi,

I understand (from reading another thread) that it is not possible to filter results where a boolean value is false due to the fact that the field is seen as empty and not false, is this correct?

I am trying with the following code but it is throwing an error in the console…

TypeError: Error.captureStackTrace is not a function. (In ‘Error.captureStackTrace (s,s.constructor’, ‘Error.captureStackTrace’ is undefined

$w("#datasetMembersOnly").setFilter(wixData.filter()
        .not(
            wixData.query("MembersOnly")
            .eq("approved", true)
        ))
        .then((results) => {

            $w("#rptMembers").show();
            console.log("showing all members to be approved");

        })
        .catch((err) => {
            console.log(err);
        });

Is there another way to check if the value of a boolean is false?

Thanks,
Rachel

Hello, Rachel,

is your #datasetMembersOnly dataset connected to the list which you want to filter? If so, the following code should work fine:

$w("#datasetMembersOnly").setFilter(
    wixData.filter().ne('approved', true)
).catch((err) => {
    console.log(err);
});