Error in Coding

Hi everyone,
I am currently having an error in the code connected to the data dropdown. Line 10 is where I am getting the error message "Parsing error: Unexpected token ;

What it seems like it wants me to do is get rid of the ; on line 10, but when I do that it jumps down to the next line and tells me to get ride of the } and so on and so forth. I could you some support!

Thank you!


import wixData from 'wix-data';

$w.onReady (function () {

}) ;

export function year1_change(event) {
let searchYear = $w("#year1").value;
$w


(“#seeourimpact”).setFilter(wixData.filter().contains(“year”, searchYear);
}

export function category1_change(event) {
let filtercategory = $“#category1”).value;

$w(“#seeourimpact”).onReady( () => {

If (filterCategory === “Culture”) {
$w(“#seeourimpact”).setFilter(wixData.filter().eq(“culture”, true));
}

If (filterCategory === “Community”) {
$w(“#seeourimpact”).setFilter(wixData.filter().eq(“community”, true));
}

If (filterCategory === “Catalyst”) {
$w(“#seeourimpact”).setFilter(wixData.filter().eq(“catalyst”, true));
}

If (filterCategory === “Healh & Well-Being”) {
$w(“#seeourimpact”).setFilter(wixData.filter().eq(“healthwellbeing”, true));
}

If (filterCategory === “Education”) {
$w(“#seeourimpact”).setFilter(wixData.filter().eq(“education”, true));
}

If (filterCategory === “Environment”) {
$w(“#seeourimpact”).setFilter(wixData.filter().eq(“environment”, true));
}

If (filterCategory === “Social Innovation”) {
$w(“#seeourimpact”).setFilter(wixData.filter().eq(“socialInnovation”, true));
}

If (filterCategory === “Family”) {
$w(“#seeourimpact”).setFilter(wixData.filter().eq(“family”, true));
}

}
)}

export function category1_change(event) {
//Add your code for this event here:
}

export function year1_change(event) {
//Add your code for this event here:
}

You’re missing a parenthesis ) before the semicolon.

2 Likes

I added a parenthesis before the semicolon and it worked but then it d


rops down saying I have a new error on line 18 (screenshot included)

@accounts82957 if not If (lower case, not upper case)