Show field on wixDataQuery

Hi

I feel like this is something simple, but cannot figure it out.

I am wanting to check if a user is included in a specific collection and if not, display a message in a box by unhiding that box.

Current code is as follows, with the results populating in console happily, but not being able to use the results to show the box I want to pop up?

let check = $w ( ‘#reviewUser’ ). value
wixData . query ( “rating” )
// userRate is the column in the collection I am checking
. eq ( “userRater” , c heck )
. count ()
. then (( results ) => {
if ( results > 0 ) {
//Expected box to be shown
$w ( “#reviewMissing” ). show
console . log ( results )
}
})
Is there something wrong with my syntax? Is this code? Or is it a bug? Slowly going bmad looking at this so any help is appreciated! :stuck_out_tongue:

import wixData from 'wix-data';

let myDatabaseID = "rating"; //<-- you are sure that this is the correct DB-ID ?

$w.onReady(function() {
    let value2check = $w('#reviewUser').value
    wixData.query(myDatabaseID)
    .eq("userRater", value2check)
    //.count()
    .find()
    .then((res) => {console.log("RESULTS: ", res);
        if (res > 0) {console.log("ITEMSfound!!!");
            $w("#reviewMissing").show("fade");                        
        }
        else {console.log("No ITEMS found!!!");}
    });
});

Yup - that is the correct DB ID - Will give this suggestion a try and see if I can get it to work. Thanks for the pointer!