I am having two issues with Filtering a static collection list:
I would like to filter a list of events by the state that the host organization is in. The data looks like event item > org item > org state. The static collection filter option only goes to the second level {org item}. Is there a way to access deeper levels? I could add the state to the event directly when created, but would rather have the data in one place.
The second issue is more design-related. I would like to have a sticky section at the top with filters. When you are further down the list and want to filter, the page becomes shorter and you lose your place. One solution may be to return to the top of the section when the filter is clicked. Is there a no-code or javascript method to do this? It would need to be part of a no-code workflow. The best solution would actually maintain your position relative to the list, but this may be too difficult for now. Here is a loom video explainer:
I @foliodc , for your point 1, this is indeed not possible at the moment. This is a known limitation, and having deep filters is currently on our roadmap.
I found an easy workaround in Xano for the frontend filter depth limitation. I used a Join and Eval to add the info to the top level. May not work in all cases.
I would still like to solve my second issue. When someone filters a list, can I send them back to the top of the list? Is there any way to move to the top of a specific section using a workflow +/- Javascript?
@Mael Thank you for your reply. I tried that custom javascript in the workflow, but I get a syntax error. Maybe I’m missing something, tried some searches online.
Section is named ongoingSection (tried a few names). The workflow is on the button, “By Gallery”
@Mael I had really unpredictable behavior when using the no-code method while triggering a workflow. Sometimes it would run the workflow and change the variable only or move only, sometimes nothing, sometimes both. Decided it is better to combine with workflow. Ideally, the change page action in workflow would allow section input. I don’t think it’s possible with parameters (?)
@dorilama Thank you! Unfortunately this results in a different error:
It’s because it can’t find the element in the page, and you can’t call scrollIntoView on null.
Are you testing this inside the workflow editor or in preview mode?
The context of the workflows is different if you execute the in the workflow editor or in preview.
The document in the preview is your app document, while in the workflow editor it’s the weweb’s editor document and your element is not here.
Because this action is scrolling the page there is no real use in testing it in the workflow editor.
Try testing it in preview mode.
If you still get the same error then it’s because your element is rendered into the page after the execution of your workflow. This can happen sometimes with modals.
If this is the case you may need something different to select your element, for example an intersectionObserverlike in this post.
Anyway accessing an element directly in a vue app is considered an anti-pattern.
In your nocode try did you bind the id of the section to the link? Maybe this can have rush conditions and work erratically.
Anyway an action for scrolling inside a workflow can be useful.
Just for information, you can do wwLib.getFrontDocument() rather than just document to be sure to always target the app document (iframe in the editor or the published app).