DMXzone App Connect Support Product Page

When I use 'group by' in a repeat, the 'order by' rules I set in the query are ignored

Reported 16 Apr 2020 11:27:21
1
has this problem
16 Apr 2020 11:27:21 Bruce Wilkie posted:
Hi there

I have created a query that selects a list of projects which are sorted in order of date of completion. It's a joined query because I need to include details of products used on the projects, which I can then filter the list by on the web page.

So what I have is a web page that allows me to select one or more products (using checkboxes) in order to display a list of all the projects that used any of the selected products.

Because it's a joined query, this results in multiple instances of several of the projects in displayed list. For example, if I select two products and both were used on a given project then the query returns that project twice.

My solution is to use 'Group By' on the repeat, grouping by product_id. This gets rid of duplicate projects in the list on the page. It doesn't matter that the list doesn't show all the products used as that's not needed on this page. Users will click through to a project details page and that will have all the product info on it.

So it's all working as I want, apart from one thing. When I apply the 'Group by' on the repeat region, it suddenly ignores the 'Order By' completion date rule I set up in the query in Server Connect.

How do I fix this?

thanks in advance
Bruce

Reply to this topic