You could do the following
Step 1 Retrieve the entire list of attendees.
In step 2 filter based on the enum
Step 3 Count the result
And you can filter and count the NotAttend the same way.
For more information, you can check out the list section in the documentation.
Hello Jeff Yu,
You need to retrieve the list of the entity the enumeration is an attribute on:
For example:
Student entity has an attribute attendance,
1. then you retrieve the entity student by xpath attendance = Attend and after that action you directly use the aggregatelist action count, then you have the amount of attended students.
2. after you do the same but then with the xpath attendance = Non Attend and directly after you do the again an aggregatelist action on your retrieve list this the amount of unattended students
The retrieve + aggregate list action is an optimized combination within mendix instead of giving back the full list mendix will give you back the result of the aggregation, note this only is optimized if you do not use the list later in the flow.
see also:
https://docs.mendix.com/refguide/aggregate-list/
Hope this helps
Good luck!