# Strange databaseManager.getFoundSetCount behavior

**URL:** <https://forum.servoy.com/t/strange-databasemanager-getfoundsetcount-behavior/1889>\
**Category:** Classic Servoy\
**Created:** [May 13, 2004, 10:14pm UTC](https://forum.servoy.com/t/strange-databasemanager-getfoundsetcount-behavior/1889 "2004-05-13T22:14:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dponti](https://avatars.discourse-cdn.com/v4/letter/d/da6949/32.png) [@dponti](https://forum.servoy.com/u/dponti)\
**Post date:** [May 13, 2004, 10:14pm UTC](https://forum.servoy.com/t/strange-databasemanager-getfoundsetcount-behavior/1889/1 "2004-05-13T22:14:45Z")

</div>

I’m trying to use the databaseManager.getFoundSetCount function (called from an onRecordSelection event) to populate a global to display the total records in a foundset where the number of records are \> 200 (testing with a table with ~10000 records). When displaying all records in a table using the loadAllRecords function or with the Show All command or when a table first loads, the resultant value is -1 (no error results). The function appears to return the correct value with any other type of Find, even if the total records in the foundset exceeds 200.

Any idea what I’m doing wrong, or is this a bug? I’m running Version R2 2.0.1-build 274 on Mac OS X.

In case it matters this table has a permanent filter (set at form load) attached using the addFoundSetFilterParam function.

Thanks!

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [May 14, 2004, 2:14pm UTC](https://forum.servoy.com/t/strange-databasemanager-getfoundsetcount-behavior/1889/2 "2004-05-14T14:14:04Z")

</div>

first of all. Never call that c onstantly in an on record selection.  
Only after a find or loadall.. Anything else will be much to heavy in the end.

I have fixed youre problem with total foundsets. (2.0.2+)

---

<div class="post-metadata">

**Author:** ![dponti](https://avatars.discourse-cdn.com/v4/letter/d/da6949/32.png) [@dponti](https://forum.servoy.com/u/dponti)\
**Post date:** [May 14, 2004, 3:35pm UTC](https://forum.servoy.com/t/strange-databasemanager-getfoundsetcount-behavior/1889/3 "2004-05-14T15:35:29Z")

</div>

> jcompagner:  
> first of all. Never call that c onstantly in an on record selection.  
> Only after a find or loadall.. Anything else will be much to heavy in the end.
> 
> I have fixed youre problem with total foundsets. (2.0.2+)

Thanks for the fix - I really appreciate how responsive you guys have been. Is the fix in beta yet? I’ll check the downloads. Thanks also for the tip regarding onRecordSelect - I’ll move that method once I get scripts written to take over for the default find behaviors.

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [May 14, 2004, 8:45pm UTC](https://forum.servoy.com/t/strange-databasemanager-getfoundsetcount-behavior/1889/4 "2004-05-14T20:45:03Z")

</div>

it will not be in a beta but in a fix for the 2.0.x stream.  
a new fix (2.0.2) will be released comming monday
