I'm having a problem with this function returning a value. Can someone give me suggestions? I know it has something to do with the scope.
Hi Frank,
Query() function return a promise, means is asynchronous function, as a result you may return a value before the value from the query function return.
Try to use async and await in order to pause the execution of your code until the promise is resolved.
View this article for more info
https://support.wix.com/en/article/corvid-working-with-promises#asyncawait-1
Best,
Sapir
Perfect!!. I have it working now