Grouping not Working Properly

I’m having an issue with table grouping. My app tracks purchase orders and related information. I have a table view that has the POs grouped by Customer. The customers are listed A-Z. Everything works fine as long as the number of records does not exceed the current number of records allowed by the pagination. If for example I have 40 records and have the pagination set to view only 25 at a time, my customers are no longer listed A-Z. I have customers that begin with an A on the second page, I have some customers on multiple pages, and it’s not a case of that customer “rolling over” to the next page, it just split the records for some unknown reason. I tried to see if there was some other way it was trying to organize the table but none of the other fields are in any kind of logical order so I can’t for the life of me figure out what it’s doing. Has anyone else had this problem?


Here you can see page one and page two of the table view when the pagination is set lower than the number of records. The first customer on page two should be the very first customer overall, and the second customer on each page is the same customer. Those four records should all be grouped together.

I’m hoping there is an easy fix that I’m missing but I’ve checked all the settings. The table and the objects are set to sort by customer. Again, you can see below that if I up the pagination everything aligns properly. The problem is the number of POs will continue to grow and eventually there won’t be an option large enough to show all the records.

I’d recommend raising a ticket to support@knack.com. I think there is a bug with groupings. I was talking with another builder who has two groupings and it ignores the second group order.
The group order box is also empty so you can’t change the order.

Thanks Carl, I’ve sent in the ticket. We’ll see what they find.

1 Like

Hi @John_Prescriptive.Solutions , grouping does not work if you use a connected field or connection (not sure if it is a bug or by design).

The best is to use a text formula to fix this sorting issue. So instead of using the Customer field (a connection field I imagine), you add a text formula to your child object that retrieve the customer name and use that new field as the grouping field.

I hope that helps

2 Likes

Hey @Loic_Wiseflow - thanks for jumping in on this one. I missed that it was a connected field so is likely sorting by the hidden record ID not the field description.
Ironically, this question came up on the same day that I had an issue with grouping whereby the sort order has disappeared. So, for example, if you sort by client name and invoice number it only sorts by the name and ignores the sort for invoice.
The group order box is also empty which is how you define the order for multiple groups :man_shrugging:

Thank you @Loic_Wiseflow. Wish I didn’t have to use this workaround but if it works, then that’s what we’ll do!

It is not ideal indeed. If this is a bug it should be fixed, if it by design then those fields should not be available in the builder to be selected ast the “sort by” field.

Following as I am having this same issue. This has to be a bug. What’s the point of setting the sorting for a view if it’s only sorting on each page of data separately. We discovered that some of customer requests were being ignored because of this issue. What should have been top of the list on page 1 is down on page 5. Knack really needs to fix this. Has a trouble ticket been submitted by anyone?

1 Like