32
Views
2
Comments
How can I count the number of objects of an entity according to an atributte?

Hi! I need help in the counters subject. I want to show the sum of "slots"(entity), that share the same ArmazemId. How can i do that?


 

When i try to show how many slots i have, i want to show only the slots of the "armazem" selected, instead of showing 3 (last picture), I want to show 1 because the "Armazem A" only has 1 slot. 

Rank: #86

Hello there Mariana,

Hope you're doing well.


I think you're just missing a filter in your Aggregate:

Slot.ArmazemId = SelectedArmazemId

This will filter your records just for that selected ArmazemId.

After that you just need to do the Count :)


Kind regards,

Rui Barradas

Hello Mariana,

Good day!

In addition to Rui, after you've put the appropriate filter, you can use the Count property of the Aggregate/Fetch Data. No need to use any Group by.

Thank you and kind regards,

Chris