DMXzone App Connect Data Traversal Support Product Page

Answered

Sorting data view on a summed value

Asked 15 Apr 2018 18:25:24
1
has this question
15 Apr 2018 18:25:24 Lee Woolsey posted:
I have an App Connect data view that uses Group By to aggregate scores from a related table. The results are then displayed in a table that is filtered by a selected drop down value. All this works correctly. However, I would like the results sorted in descending order, I've tried a number of variations of the 'sort on' option, but have had no luck. Is this possible? If so, how should the string be structured.

Here is the page: questofchampions.com/standings.php

Here is the data view definition I last tried:

<dmx-serverconnect id="entries" url="dmxConnect/api/frontend/standings.php"></dmx-serverconnect>
<dmx-data-view id="standing_view" dmx-bind:data="entries.data.allEntry.groupBy(&quot;qocID&quot;)" filter="$value[0].divisionID == sel_division.value" sorton="$value.sum('points')"></dmx-data-view>

Replies

Replied 20 Apr 2018 10:42:48
20 Apr 2018 10:42:48 Teodor Kuduschiev replied:
Hi Lee,
Unfortunately it is no possible to do this with the current version of data view component.
Replied 20 Apr 2018 15:22:56
20 Apr 2018 15:22:56 Lee Woolsey replied:
Bummer.

That would be a great option in a future release! I had also tried assigning the summed value to another object on the page (like a hidden input field) but couldn't make that work either. Thanks for checking.

Reply to this topic