I have a page that connects data to a repeater. I followed this example to get everything hooked up. https://www.wix.com/corvid/forum/community-discussion/connecting-repeater-to-database-in-condition-if . It works just fine. Now, I want to filter the query with either .startsWith or .contains. But, it never works - it just throws an error no matter what I do.
I followed this example to make sure my syntax is correct: https://www.wix.com/corvid/reference/wix-data.WixDataQuery.html#startsWith
$w.onReady(async function () {
$w('#repeater1').data = await getData() ;
});
async function getData() {
return wixData.query("PaidPlans/Plans")
.startsWith("name", "ironman")
.find()
.then((results) => {
return results.items;
})
}
Here’s the error I get:
Again, if I remove the .startsWith line everything works fine. If I change .startsWith to .contains I get the same error.
And here’s the column in the collection
What am I missing?