# Displaying a foundset count on form

**URL:** <https://forum.servoy.com/t/displaying-a-foundset-count-on-form/12496>\
**Category:** Classic Servoy\
**Created:** [July 21, 2010, 7:20am UTC](https://forum.servoy.com/t/displaying-a-foundset-count-on-form/12496 "2010-07-21T07:20:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rodneysieb](https://avatars.discourse-cdn.com/v4/letter/r/87869e/32.png) [@rodneysieb](https://forum.servoy.com/u/rodneysieb)\
**Post date:** [July 21, 2010, 7:20am UTC](https://forum.servoy.com/t/displaying-a-foundset-count-on-form/12496/1 "2010-07-21T07:20:04Z")

</div>

Hi

Am finally getting around to upgrading an old (but large) solution to version 5.1x. I have successfully imported and cleared all errors and warnings (problems) in my solution.

I was using the following global method to write a foundset count to a global and then display this global on a form

```auto
var x = " (" + databaseManager.getFoundSetCount(forms[currentcontroller.getName()].foundset) + " records in foundset)";
globals.rec_display = x

```

I would then call this method “on show” of form or after a find to display the current foundset of the current form.

This worked fine in Servoy 2.27 but now i get “0 records in foundset” on show of the form. If i “load all records” however it works correctly

Has this somehow changed in 5.1x?

Also I note that controller.saveData (); has been deleted. Is this still supported or should i search/replace with databaseManager.saveData () everywhere as soon as possible?

Any help would be appreciated.

---

<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:** [July 21, 2010, 12:32pm UTC](https://forum.servoy.com/t/displaying-a-foundset-count-on-form/12496/2 "2010-07-21T12:32:45Z")

</div>

that should still work fine  
what happens if you right before you assign x you do:  
application.output(forms[currentcontroller.getName()].foundset.getSize());

So what is the ‘current’ size of the foundset when you ask for the total size?

controller.saveData() still works but the preferred way is now to use databaseManager.saveData()
