Dear Bubble fam,
Thereās a list of orders stored inside each User. However, not all users have orders.
I need to create a list of total orders for each user, but get 0 or null if that user has no orders.
Experimenting with āgroup byā¦ā and aggregating with count, but am only getting values from users with orders.
Any leads on this would be of great help!
Do you also get the users with empty lists or they donāt even show up to be grouped at all?
Canāt you just make (2) āDo search forā request and save the returned data to a state on the page? one state can hold the users with orders and the other state can hold the user with no orderā¦but the primary question would be is what do you want to do with the list? display it in a RG or manipulate it?
if your displaying it in a RG then you can use the states as the date source and use the :merge to combine the two lists
Hey Vini, they donāt show up if they donāt have orders.
Suppose my list of users: Tuna, Timmy, Tina, Tom and Tony. Only 3 of them have orders.
When grouped by user, aggregated by count, my list will only have 3 values, but my user list is 5 values. Thatās the issue Iām trying to solve.
Hey Shawn, I need to extract data from my list of users, and have that list be the same ālengthā and in the same order as my list of users. This so I can add it in a Table / Grid view plugin made by @Thimo
Iāve combined two lists in a similar way as youāre suggesting, but merge will change the order of the list, thus not workable for a Table.
I know @keith is one of the best around here for working with data and lists. Do you think this is possible? Itās sort of an iteration: check how many orders user 1 has, user 2, user 3⦠and so on and make a list from the count of each user.
You just mentioning Keith already triggered the iteration powers in me 
Try iterating on the list of users and in each iteration store the list of orders:count in a list, use list shifter to generate a list that accepts duplicates to store the numbers.
Then display that list or do whatever, always using list shifter or list popper plugins to not deduplicate a list.
system
Closed
6
This topic was automatically closed after 70 days. New replies are no longer allowed.