wixData.query blanks table rather than filtering it

Hi!
I’ve spent a fair amount of time searching for an answer for this one, but I’m stuck!

I have a table, #table1. This table is linked to #dataset2, which is in turn linked to my database called GroupOne.
This table displays all of the user’s data when initially loaded, and I’m trying to set a dropdown menu (#dropdown2) to filter the data displayed in the table. Whenever I select an item from the dropdown menu, all items in the table disappear.
My dropdown list has each number with the value set to be the same as the number.

Here’s the code I have:

import wixData from ‘wix-data’;
$w.onReady(function () {
});
export function dropdown2_click_1() {
wixData.query(“GroupOne”)
.eq(“numberofPoints”, $w(“#dropdown2”).value)
.find()
.then(res => {
$w(‘#table1’).rows = res.items;
});
}

To try and preempt some questions:

  • The field in the database definitely has the capitalisation numberofPoints, that’s probably poor planning on my part, and I’ll fix that later!
  • The dataset #dataset2 is read only, and has the filter ‘Owner is logged in user’. I’ve tried removing that filter but no luck.
  • I’ve checked that there are some items in the database that do match the numberofPoints selected from the dropdown list.

Thanks in advance for your help!