Now, I’m try to calculate total number of classes in a particular area like
Current Area → Schools → Classes → Count
But gives me 0. Even though the Collections has records.
The same is the case if I apply sum to a certain numberic field in the Classes table. But in case of sum it doesn’t even show 0.
So does this not work? If not then why to show count and sum and other functions on these sub levels? If yes, then is it a bug? Or am I doing something wrong.
Not sure how you made the relationship. In my case,
An Area has Schools in it. So the Area is related to Schools in 1 to Many relationship. Then a School has Classes it it. So School is related to Classes in 1 to Many relationship.
So first I have Current Area → Then Schools → Then Classes. In your case, seems like you somehow skipped the Schools.
By the way, if I have just one relationship like Area → Schools or Area to Classes or School to Classes then these functions work pretty fine.
The problem only occurs when we got the third level. As per structure of Adalo filters and functions this should work. But it doesn’t.
Hi @scientist ,
If I read correctly, the 3 levels all have a 1 to Many Relationship correct?
I replicated your issue in a list of Areas for example, showing the count of classes it worked for me:
MY result (School 3 is from HAmptons, there is only painting in School 3, there is no School 1 with classes) and rest is in School 2 and 4 that belong to Long Island)
So what i was doing wrong is that I was filtering the schools first, like where you just said All Classes → Count, i was doing it like Current Class → Schools → Areas…thinking that it will join.
But what I got from your reply is that we still use the same logic as we do in regular database query
like count Classes
joining areas/schools/classes
where area is the current area.