When I go back into the editor after logging out and coming back one of my filters on the data collection keeps resetting - causing the query to fail. It maintains the actual function but drops the field and operator. Any advice?
Ok I think this was unrelated to the query - I had a dropdown component that wasn’t setting values correctly. It expressed in a way, here, that wasn’t super intuitive to me, but working on a separate fix
You need to fetch the collection first time in order to be able to see the data. The way WeWeb handles this is after the fetch it “analyses” your data and proposes filters. It can’t foresee your data before you show it to it.
To clarify - this was a query that had already been working, and that I had built components around
What was happening (and is still something I’m investigating a bit), is that this query was based on the result from another query, which wasn’t updating automatically.
I assumed that all the collections would refresh during every page load, so trying to debug why they arent…
Collections “update” - a.k.a fetch only if they’re used in a page. - This is how WeWeb actually does it, and it’s a feature. A workaround might be binding that collection to something invisible, or fetching the collection on Page Load with a workflow.
that makes sense - and that is a great feature. I do use it in my page though, so not sure that explains it. The query in particular that isn’t fetching is one that using the auth.uid - do you think that might have special handling?
If you want to fetch a collection on page load and you’re not using it in that page, just fetch it via a Workflow on page load
I am using it in the page, or at least I’m using it in one of the components (a drop-down menu) is that sufficient?
ok for now I just created a page workflow that triggers all the collections. Seems like a bug to me that the page isn’t doing this already
There’s a fetch collections in parallel option that can make that easier.
Not only easier, but also faster