In the retrieve activity, why not to add an option retrieve only the count, instead of retrieving the full list with its data, and do another activity to count?
this will be very useful especially for designing complex dashboards, it will increase the performance in two ways:
I’d love to have an internal function that could be used on a list or association containing a list:
Yes, would love to keep the clutter in the flow minimized if we could lose the additional COUNT action after the retrieve and instead select it in the Retrieve action.
While Mendix optimizes the querie, I still think it could be a valuable addition, as it encourages users to do a “normal” retrieve only if they need to use the data after the count. Right now, too many developers still use the result of the retrieve further down the microflow, while in many cases the count alone suffices and the optimization of doing just the count is lost.
Thanks for the valuable comment Tim.
Actually, Mendix does that for you. Check out the documentation about this: https://docs.mendix.com/howto/logic-business-rules/optimizing-microflow-aggregates