Aggregation over empty foundset in NG Client

Hi All,

Servoy aggregation on db table in NG Client, it is observed that aggregation over empty foundset gives NULL result rather than zero (Previously in Smart Client it gives zero result).

Any help will be highly appreciated to achieve zero result for aggregation over empty foundset in NG Client.

Regards

Hi,

You can always use something like this:

var myAggrValue = myAggrField || 0; // when null, undefined or even 0 failover to 0

It essentially works the same as COALESCE() is SQL.

Hope this helps.

Thanks Robert Ivens for the guidance.

I have tried this, but its not working because variable created is not connected with foundset. Hence, no correct value appears on UI.

Regards

Can you show us your code? This will give more info on what you are trying to do.

I am testing on a simple form. In body, grid is placed and in footer Count (aggregation of record count) is placed.

Using variable strategy will require a function call updating form variable to trigger whenever foundset change occur which is not required if we use aggregations.

Regards

Any suggestion to achieve the results will be appreciated.

Regards

Case created.

Here is the URL:
https://support.servoy.com/browse/SVY-15682

Regards