Repeating Group by Date

Picking this up again after a few years…sigh

In my previous question here, I am still not able to group by dates without seeing duplicates in the results. I think I’m following the instructions correctly in the Bubble Doc’s here, yet still getting errors and I have no idea why. There doesn’t seem to be any good tutorials on the web or youtube that address what I thought would be a pretty simple use of repeating groups. If anyone on the bubble team can provide guidance, I would be extremely grateful!

You don’t need to use Group by here — that’s only for aggregating values.
If you just want to filter by date, keep it as Do a search for Transactions and add a constraint on Transaction_Date (e.g. Transaction_Date ≥ [some date] and ≤ [some date], or even use an Arbitrary date). That will give you the right results without duplicates, and you can display them directly in a repeating group.

Thanks for the reply. Are you able to provide an example showing this works? I think what’s needed is a “unique” parameter but I don’t see any available in bubble. After trying some more, I’m able to get the “group by” working in the parent repeating group, but am now struggling to link the children to the parent date - something that would be really simple in my SQL days…

With “group by”

Without group by

With a constraint actually returns nothing, so I’m not sure what else is going on there

I found a solution with a simple breakdown here:

example data (“Transactions” table):

  • Sept 12, Transaction 1
  • Sept 12, Transaction 2
  • Sept 13, Transaction 3

previous attempted display:

  • Sept 12
    • Transaction 1
    • Transaction 2
  • Sept 12
    • Transaction 1
    • Transaction 2
  • Sept 13
    • Transaction 3

desired display (without duplication):

  • Sept 12
    • Transaction 1
    • Transaction 2
  • Sept 13
    • Transaction 3

Design:

[Parent repeating group] - note the use of “unique elements” below

  • Text Date

  • [Child repeating group] - note the use of “current cell’s date” based on the parent repeating group row as a constraint

    • Text Transaction Description - note that this also uses “Current cell’s…” syntax but is referencing the child repeating group row now

From here more fields, constraints, sort orders, etc. can be added but this is the bare minimum way to link the repeating groups and avoid displaying duplicate parent rows

Hope this helps anyone looking to do the same (and myself in the future, haha)

Cheers