It’s not so clear what you’re trying to do:
-
read the docs https://www.wix.com/velo/reference/wix-data/query
-
. please rewrite the code so the look function declaration won’t be inside export event handler.
-
your query has no parameters, add them to the query.
-
do not run the query 21 times, use .hasSome() to run it one time.
-
If it still doesn’t work, post the the corrected code here in a code block