Implement validation for invalid Sorting after Group By in Aggregates
8
Views
0
Comments
New
Aggregates & Queries

Currently, if we define a Sorting by an attribute, that sorting becomes unresponsive after introducing a Group By in the aggregate, as the sorted attribute is no longer part of the aggregate output . This does not raise any errors or warnings in the TrueChange Tab or any signaling in the workspace.

I find that this is an easily overlooked situation that can lead to unexpected behavior or inconsistent results.

I suggest the implementation of a typical Outsystems background validation that triggers a warning (written on the TrueChange Tab and a visual cue on the aggregate) whenever the aggregate's sorting references attributes that are not part of the aggregate output after a Group By, ensuring consistency and preventing silent issues.