Soting data in groups

jeanl

Member
Hi

I hope I can explain my request adequately. I have a list and data is grouped according to a status, eg Started, In-Progress, Completed. Data is sorted by date. I would like to ask if there is a way to sort the data either ascending or decending, based on which group it falls into?

Thank you in advance.
 
You mean e.g. if Status=Started sort ascending, else descending?
I think you have to use a custom list template and change the array order of these groups.
 
You mean e.g. if Status=Started sort ascending, else descending?
I think you have to use a custom list template and change the array order of these groups.
Troester. Thank you. Yes, so where status is "Completed" for example I want it sorted ascending, and where status is "In Progress" I want it sorted decending. The list is grouped by status.
 
The Wiki will help: http://fabrikar.com/forums/index.php?wiki/creating-a-custom-list-template/
For what you're up to, you'll need to have or gain good knowledge of PHP, particularly of dealing with arrays and objects. Or, if that's a no-no, eventually hire someone who knows.
Thank you. Looking at the info in the wiki, I think it is safe to say I haven't got even a clue where to start. I suppose I will have to find someone who can do it for me, or just live with the sorting as is.

Thank you for the feedback. I appreciate it.
 
Copy bootstrap template, in default.php around line 112

if ($groupedBy == 'your status with alternate sorting') {$group = array_reverse($group);}
foreach ($group as $this->_row) : ...
 
Copy bootstrap template, in default.php around line 112

if ($groupedBy == 'your status with alternate sorting') {$group = array_reverse($group);}
foreach ($group as $this->_row) : ...
Hi Troester

Thank you. I will take a look. I use a custom template that Hugh still made for me, so not too sure I have the skills to do this, but will look at the code and let you know.
 
Back
Top