Group By option on a list

Hi all,

I have the "Group by" drop down above a list. It shows all the columns in the list. However, if I select anything but "None" it clears the list. The list has a pre-filter applied. I have tried in Chrome, Firefox and IE 11. Same results. My client said that he was able to make it work once. I've never seen it do anything but clear the list.

I have tried to set it to group by on a specific field in the list setup "Data" and Group By tab and that seems to work, but then it's limited to a single column.

We are using Bootstrap as front-end template.

Any ideas on how to make this work?

Best regards,
 
That feature definitely works, so I'd have to take a look at the site to see what's happening. But I can't do that in Community support, you'd need a support sub. Which is definitely something you need to do if you are developing apps for clients using Fabrik.

-- hugh
 
Hi guys,

Is it possible to set a time schedule for looking at the site? The data is being pulled over from a web service into SQL tables and the web service is currently on a server that shuts it down after it's been running for an hour.

Best regards,
Arnor
 
Actually I misspoke, there are issues with the "group by" feature when using AJAX navigation. I'm working on it.

I'm assuming you are using AJAX?

-- hugh
 
Hi Hugh,

Yes, I was. Turned it off and got some grouping to work but it acted very weird - was not showing all the data. Then it stopped working again. AJAX is now turned off. I had set the list up to use tabs for one of the fields in the list to try that and it worked fine. I.e. both the tabs and group by were active at the same time. When I turned the tabs off, the group by stopped working again. Note that there is a pre-filter on the list.

Does the "Group By" send a new query to the server or does it group this "internally" using js/css/etc. ?

Best regards,
 
It reruns the query.

I'm working on the group by stuff this week. May have some fixes coming up. Can't guarantee when though.

-- hugh
 
Hi Hugh,

Is there any way to see the query? I have the debug on and I see the *original* query, but it doesn't look like it is refreshed when the Group By is selected.

If you need testing, let me know! Been testing code for 30 years;) It's not a show stopper for us, but it would make our app a lot more attractive to users:)

Best regards,
Arnor
 
Hi Hugh,

Don't know if this helps. Originally I only had a few rows in the table. So I added more rows, so that there were two pages displayed in the list. Then group by started working, kind of: It would ONLY group the first page and then again on the second page. I.e. grouping on a status that had either A or S in it, it would group the first page into A and S and then page 2 would also group into A and S for the rows on that page. Not very intuitive. Then it threw an SQL error which indicated that it was trying to filter on the autonumber ID which it should not. Then, as mysteriously as it started working, it stopped working.

Best regards,
Arnor
 
Hi Hugh,

I set up another list on a different page and it shows the same behavior. Tried it on another list on a different table, same thing.

Best regards,
Arnor
 
Hi Hugh,

Don't know if it adds anything, but I noticed that when I set the Group By it still shows the pagination, so it looks like that part thinks it has enough rows to fill the list:

2017-03-28_18-30-36.png
Best regards,
Arnor
 
Hi guys,

Any progress on this? I cannot get this to work at all. I turned logging on in mySQL (MariaDB actually in my local install) and what happens when I set Group By to a field called ven_status is:

First a SELECT to find the distinct values:
306 Query SELECT DISTINCT(`jos_iscm_data_purchase_order_list`.`ven_status`)
FROM `jos_iscm_data_purchase_order_list`
WHERE ( jos_iscm_data_purchase_order_list.juser_id = '64' ) LIMIT 100

The results of this is:
"ven_status"
"A"
"S"


Then there are two calls that look to be identical:
306 Query SELECT DISTINCT(`jos_iscm_data_purchase_order_list`.`ven_status`) AS `text`, `jos_iscm_data_purchase_order_list`.`ven_status` AS `value` FROM `jos_iscm_data_purchase_order_list`
WHERE `jos_iscm_data_purchase_order_list`.`ven_status` IN ('A','S')
ORDER BY text ASC LIMIT 0, 100

306 Query SELECT DISTINCT(`jos_iscm_data_purchase_order_list`.`ven_status`) AS `text`, `jos_iscm_data_purchase_order_list`.`ven_status` AS `value` FROM `jos_iscm_data_purchase_order_list`
WHERE `jos_iscm_data_purchase_order_list`.`ven_status` IN ('A','S')
ORDER BY text ASC LIMIT 0, 100

The results of those two queries are identical:
"text","value"
"A","A"
"S","S"

There is no SELECT to re-fill the list and the list is always empty after a GROUP BY is selected.

I have tried to create lists that use some of the Joomla data tables and they also behave the same way - Group By clears the list.

Best regards,
 
I can't replicate that here, so I'll need to take a look at your site. Fill our http://fabrikar.com/you/my-sites.

You won't see a "group by" in the query, as we do the grouping in the app after the query, we don't do that in the query. For deeply gory and intractable reasons.

Make sure you've done a github update, as I've fixed a couple of things to do with the grouping menu action.

-- hugh
 
Hi Hugh,

Will do! I seem to recall that I found somewhere that the list was re-loaded after the Group By. Must have been dreaming;)

Best regards,
Arnor
 
Hi Hugh,

Was a bit premature. Sometimes it seems to filter on the LAST item on page 1. Say if I have this column:
upload_2017-4-4_16-29-14.png

And I set a group by on the Vendor status, I get:
upload_2017-4-4_16-29-32.png

I.e. it filters on the last entry on page 1. If I change the status on the last item from S to A, I get:
upload_2017-4-4_16-30-31.png

Which is also wrong as there is only 1 item with the vendorstatus "A"

See also: https://www.screencast.com/t/LoI965Gx

Best regards,
Arnor
 
Update - AJAX Navigation and 'Group By' functionality still do not work in tandem. We are required to de-activate AJAX Navigation when the 'Group By' functionality is required on a list.
 

Attachments

  • Group By Functionality.PNG
    Group By Functionality.PNG
    4.4 KB · Views: 271
  • Ajaxify Must be set to NO if GROUP BY functinoality required.PNG
    Ajaxify Must be set to NO if GROUP BY functinoality required.PNG
    8.4 KB · Views: 269
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top