Filter data by ANY condition (need some help)

Hey @Mari Thank you very much for your help, yes this is exactly what i was looking for, even though this feature is critical for my app, do you think, that this is possible maybe with separate calls for each product id with something like a loop, or you think for many documents we will need many calls and this might bring problems?
Do you know any other way in order to achieve the same result, meaning, to call many documents from a document id list ?

thank you in advance.

Hi, I posted one example of such a loop in this thread:

1 Like

Thank you so much i will take an extensive look!

1 Like

Hey @Mari following your idea i did my own version where the logics are shown bellow and it works but with some lagging.

(the one thing that im not so sure if its optimized, is where i set the data variable by adding the new data to the old) bellow you can see the logics of the set data variable do you thing its optimal (for now you can see there are only 10 records but in the future there might be hundreds)?

I have one more question, if you can help me. More specifically as you can see in the video, it is clear that there is a loop (because of the way they appear on screen) and so i was wondering, if this is something that will also be noticeable in the final app, so the user can see them appearing one after the other, or in the final app everything happens faster and so this wont be so noticeable?

After all do you think there’s a way to minimize this ?

Thank you in advance.
I wanted to let you know that youve helped me so much with this.

Hi, you’re correct, the drawback of the loop method is that the requests are sent one after another, not in parallel, so the items will appear in the order in which they are added to the final collection. One solution to prevent the images appearing at different times is to use the Conditional Renderer component to display a spinner until the loop has finished fetching all the data, using for example a true/false page variable to indicate when loading is done.

Sending requests in parallel is also possible (so the whole operation only takes as long as the slowest request you send), but there isn’t currently a no-code solution for this. You can reach a more performant execution with the custom JavaScript node using the axios library (docs here), this article outlines how to use Promise.all() to achieve this.

i will check these out. But from what i understand, one disadvantage to this solution, is the order they appear, which for me is a plus because i need that order and the ‘big’ disadvantage is the loading time, which i can solve with your solution, but im thinking of doing it a bit different by making the loader invisible after loading 20 posts (or when finishing if the posts are less then 20) because these have to be shown first and there is no reason to wain until all are downloaded. Last of all im betting that the time needed in the actual app will be less noticeable, but i will definitely take a look at the other solution and if i can i will implement it.
Thank you very much!

I think I’m having a similar issue as this post. When I do the below filter to get a record collection using “AND” it works fine, but when I use “ANY”, I get an error.



Is it possible this is still an issue?

yeah, exactly, there are also some limitations concerning filtering Boolean variables

thanks for the reply. What limitations are there? Can I get around it if I use the REST API rather than the Firebase integration? From what I’ve seen the “ANY” doesn’t seem to work at all since the query I’m doing is fairly basic (2 equal conditions). But I’m relatively new to Appgyver so would be happy to learn I’m doing it wrong.

I may just resort to your loop solution above. Did you keep that in place in the end?

No unfortunately, you cant override the limitations with rest api, because the limitations are from firebase.
You can find more about the limitations, in firebase documentation.

what do you mean? with this?

Are you happy with the loop solution you ended up implementing (described above)? I may do something similar.

ohh, well, excepting the difficulty of making it, and the fact that there is a delay that the item appear, in the screen(you could wait until all the items are in the list and then show the list or show the list from the beginning which means that you can see the items appear one after the other) everything worked fine.

1 Like

FWIW - I ended up implementing a slightly different solution using the REST API that allows the use of an “in” query that at least lets you fetch 10 matches at a time. see Query Firestore Collection against a List of Matching Values if you’re interested.

1 Like

Hello @Mari is the situation still the same? We can’t use the filter condition dynamically, with a select statement for example?