Query collection single element results + go to the next element in the collection + proper filtering

Actions & Logic

I have 2 collection queries. One lists categories and another lists products inside.

I am displaying a list of products nested in the list of categories in a side nav. On the click on the product it gets displayed in another group on the right, where it's features (which have a product as a reference) are displayed.

  1. How can I get from the click action on the product (from a queried list) the reference of the product? What is the proper way to find the product person is clicking on inside the action flow.

  2. If the product is selected I want the user to be able to go to the next product (they have order within their category, not within the whole list of products). What should I do so the user can go to the next product - but a +1 from the one displayed?

    I am filtering a product collection query by action output, but it seems to not work properly. Now I made the product page display just a product queried from the user, so it's never empty and should remember the proper last setting. So if I solve those above I would be happy :)

What have you tried so far?
  1. I was told query collection / products / single document on the first element inside the query would do the trick, but somehow I doubt that. I filter the product list based on the action output and also have tried to save it on the user as last product to filter the queries product. But it doesn't refresh's.

  2. I used to query both product and product list and used product query to navigate but it doesn't solve going +1 / -1 in all cases plus it used to go to product nr 1 on every category as a default. But after I removed this collection query it stopped working, so I am looking for an idea what is the proper way to do it.

    If there is a YouTube video/app sample of an app that works sort of like a book with memory I would love to watch it (as this is the way my app works - navigating pages, saving what was viewed and going +1 / -1, and liking).

Did you check FlutterFlow's Documentation for this topic?
Yes
1
1 reply