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!