Hi Stacey,
When using getCurrentItem() you don’t need to pass any value, instead, the function returns an object with the field keys as its properties.
So instead of using this:
let category = $w("eventsDataset").getCurrentItem("category");
Use this:
let category = $w("eventsDataset").getCurrentItem().category;
Now, category will be an ID of the reference field in your “events” collection and
.eq("category", category)
Should work.
Also, I would recommend giving your items and variables meaningful and unique names so you won’t get confused what ‘category’(variable, field key, collection name) you are referring to.
Best of Luck!
- Lior