Hi Steven,
The RepeatingPanel displays everything from its items property, in order. If you want to set the order, you can just sort the items list! There are two ways of doing it:
-
Sort it in Python. You can call
sort()on a Python list, or use thesorted()function on any iterable object. Then just set theitemsproperty of the RepeatingPanel to the sorted collection. -
Fetch the items in order from the database. Anvil’s Data Tables include the function
tables.order_by(column_name), so you can do something like this:records = app_tables.my_records.search(tables.order_by('date_added', ascending=False))
Hope that helps!