Is it possible to get a record count for a relationship without actually loading that relationship?
I’m in a situation in which I just want to know the count, not actually go there. I definitely don’t want to disturb the current foundset. FMP’s Count function would be perfect in this situation.
The answer to Morley is from 2004 so this is a very very old thread.
But yes, getSize() will only show the amount of PK’s loaded. If you really want to know the real foundset size you should use databaseManager.getFoundsetCount(foundset) which is the equivalent of SELECT count(pk) etc. .
And to be more specific, by the touching the relation this way, WILL trigger a query to load the related data first, also when you only need the count…
ROCLASI:
The answer to Morley is from 2004 so this is a very very old thread.
But yes, getSize() will only show the amount of PK’s loaded. If you really want to know the real foundset size you should use databaseManager.getFoundsetCount(foundset) which is the equivalent of SELECT count(pk) etc. .