Count in microflow

Good Evening,   I have a datagrid where there are a number of sites and information is filled based on material from the different sites.   I want, on the home page another datagrid, where it counts how many open claims there are for each site.    I can’t work out how. It feels like it is something that can be done easily. Can someone guide me how to go about it please?   The domain model snippet is below. I have tried using the Number attribute on a separate entity called Count and a How Many attribute on the same entity as the information.     Thanks in advance for any advice.   Jess
1 answers

Hi Jess,

I think you should use 1-* in this case, and create an Attribute “Site” in the Entity “Coun”t that uses the same Enumeration. Also you can set validation in the domain model, as “Site” should be unique in Count. After that you could loop through your ClaimsBrief list, check if a Count exists with the same enum value, if not create one, if yes Number = Number + 1

Hope this helps!

Best regards,