Forum Academy Marketplace Showcase Pricing Features

Filtering repeating group data to be displayed

Imagine I have a DB type named “Federal”. This type contains ‘name’ fields. I manually upload this data (i.e. hundreds of names) via CSV and I display them on a page using a repeating group. Users can press an order button that appears next to each name.

Imagine I also have a DB data type named ‘Federal Orders’. When a user makes an order by pressing the button as described above, an entry is created in this second data type (“Federal Orders”). This entry is created using the ‘create a new thing’ feature that I assigned to the button. The information is recorded in Federal Orders as ‘product’ (a very long, Bubble-assigned ID key) and as ‘user’ (user’s email address).

I would like to have a page that displays only products that a user has not already ordered. I am open to various ways to do this. So far, I have tried to use a repeating group to display the federal’s names MINUS the federal order’s names for that user.

Can’t figure out how to do it.

Any advice?

Thanks very much,

I wouldn’t do this, but you could have a list on the user that starts with EVERY possible product. Everytime the user makes an order, you would remove that item from the user’s list. The repeating group would be showing the User’s “Products_Not_Ordered” list.

I think your way is better, as you don’t have worry about making sure the user is up to date with any new entries to the Federal list. The more I think about it, I think I would implement it as you described above.

  • First I expect you would need to create a “working table” and a “template table”.
  • The “working table” would initially be a duplicate of the “template table”. The template table has ALL of your data in it.
  • Only the “working table” would be modified.
  • The “working table” would be the one which has the “order” button inside it.
  • You would delete the particular cells item when the corresponding “order” button gets pressed.
  • If the item gets removed from the shopping list, you would add that item back into the “working table”.
  • Once the order has been placed and the shopping cart gets emptied, you would then delete all items from the “working table” and then copy all the items from the "template table’ into the “working table”.

What you need to work out is, how to copy data from one table (database type) into another.

When I say “table”, what I mean is - a “database type”.

Can you put a :filter on the repeating group that has a condition that the product “isn’t in” then do a search for :unique products on the order ?


Thanks for your replies. It seems that the type of results you get turns on what ‘level’ of nested container you adjust. Sometimes adjusting it at the repeating group level works, sometimes adjusting it within the repeating group for a cell item is needed… If there is a universal solution I haven’t found it. I am learning to manage this on a case-by-case approach with hours of experimentation. :slight_smile: