Count the data

0
I have a list view, and I sort out the list view using filter widgets. Once filtered, I need show the count of the filtered values. Is It possible? And the flow please?
asked
2 answers
1

Hi,

 

I would use the create the source of the data over an OQL statement, where the input for the filters will be driving the WHERE statement in the OQL query. Each change in the filter will result in a unique list (the filter result) that can be used for the “Aggregate list” Action to count the results. Furthermore using OQL is much faster than filtering in a list and can be used in large data sets.

 

 

An example of the OQL statement:

'
SELECT
 E.Timestamp Timestamp,
 E.Application Application,
 E.System System,
 E.Model Model,
 E.Location Location,
 E.Country Country
FROM
 MyFirstModule.Events E
WHERE
 E.Timestamp = $Timestamp AND
 E.Application = $Application AND
 E.System = $System AND
 E.Model = $Model AND
 E.Location = $Location AND
 E.Country = $CountryInput
'

 

In the flow, I use a Create Variable Action as the source of the Country, but in your case, it is the Non-Persisting Entity that contains the input variables for the Filter.

 

If you need additional guidance, mail me for a short screen-sharing session. marco.spoel@t-systems.com

 

Go Make It

 

 

answered
0

I don't think this is something which is possible out of the box. Usually we fix this using a seperate KPI entity using logic to filter and count certain items within the list to show in badges or other places on the page. 

Retrieving and counting in Mendix is really quick, so this should not be a problem to do for different scenarios on a page load, for example.
 

answered