in my app, user can write multiple comments on a page. so how can i show the newest comment on top and maintain the reverse chronological order

0
I want to showcase previously added comments according to the date (newest comment should be displayed at top). How can i maintain the chronological order in those comments. How can i show things as per chronological order in mendix
asked
2 answers
0

Hi Vivek,

You can do it by, checking the store ‘created date’ option in the entity menu and then using the list view/ data grid you can sort data on the base of stored date in ascending or descending order, as per your need,

you can refer to the image below,

 

and in the list view, 

 

Hope it helps!

answered
0

Rather than retrieving by association, you can retrieve via database with an XPath that essentially retrieves via association, it’s a little more memory hungry, but will allow you to sort by reverse chronological order.

 

Alternatively, you can create a data source microflow that implements whatever sorting logic you like, and then use that to feed your list view of comments.

answered