Date Order for Items in a Data Table List?

Hey everyone! :slight_smile:

I have a Text Field in a Data Table which is set as a List. I want to be able to display the contents being entered into that List, so that the latest entry appears first in my UI. At present, it lists the Items in the Text List in the opposite order - that is, the latest entry always goes in last. I understand that it is very easy to add a sort order to any standard Date elements, etc. and I don’t have a problem in that regard - it’s just getting the sort order right for a Data Table Text List…

Thanks!
Adam

Hello

you can do this adding an ID to the RepeatingGroup and a custom css rule

for example RG id set to my-rg

you then add this code to the page custom html header

<style>
#my-rg {
    display: flex !important;
    flex-direction: row-reverse !important;
}
</style>

Thank you - it almost works. My list is in row order - your code gets them in the right order (“backwards”) but places them as columns, instead of rows. Corrected is this - as counter-intuitive as it seems:

#my-rg { display: flex !important; flex-direction: column-reverse !important; }

Side Note: This still does not work. My research shows that List Items from a Text Field in a Data Table can be extracted almost in any order and bubble does not guarantee the list order(!)

So, what are you trying to achieve? Could you share more details? Maybe we need an additional custom code?

Sure:

This list in a text field in a data table:

image

…is what I am trying to display, in entry order, backwards - so that last entry appears at the top of the list.

Instead of storing a list of texts, create a separate “Entry” data type with:

Text (the actual content)

Created Date (timestamp)

Then, sort by Created Date (descending) when displaying.

Thanks - I am aware that I could do that - but that is an alternative solution, rather than rectifying the issue I am facing.

This topic was automatically closed after 70 days. New replies are no longer allowed.