Hi, my site has dropdown so that the user can select which params they want to search for in the database. The problem is when the user does a search, the console says that there is an uncught error. This is wrong… because EVERYTHING is surrounded by a try catch with a print of which error. Here is a screenshot of what i mean:
The console log is what the user searches for, but the query is the exact same function. Basically, i can keep pressing the export button(from database) untill it works. The only error i recive is this:
But it leads me nowhere… only shows wix’s own code. This is the query
wixData.query( “LeadsBeta” ).not(wixData.query( “LeadsBeta” ).hasSome( “orgNr” , arrayReturned))
.contains( “searchCounty” , $w( “#dropdown6” ).value)
.contains( “searchBranch” , $w( “#dropdown4” ).value)
.between( “revenue” , inputRevMin, inputRevMax)
.between( “regDate” , inputYearMin, inputYearMax)
.ne( “orgNr” , localOrg)
.ne( “tel” , cmpTelSort)
.ne( “kontaktperson” , cmpContactPersonSort)
.ne( “besoksadress” , cmpVisitLocationSort)
.ne( “revenue” , cmpRevenueSort)
.ne( “regDate” , cmpRegDateSort)
.ne( “website” , cmpWebsiteSort)
.ne( “email” , cmpEmailSort)
.ne( “resefin” , cmpResultsSort)
.ne( “profit” , cmpProfitsSort)
.ne( “asset” , cmpAssetsSort)
.limit(leadsInt)
.find()
.then ((results)=> {rest of the code here})
the error occurs inside the query, not after the .then function. To mention again, the query DOES work sometimes, but sometimes it doesnt, i can search for the same thing many times untill it works, and not give me an error. Please can someone help me. Im not a beginner at js but im not a master either.