# go to last record

**URL:** <https://forum.servoy.com/t/go-to-last-record/16279>\
**Category:** Classic Servoy\
**Created:** [July 31, 2012, 12:48pm UTC](https://forum.servoy.com/t/go-to-last-record/16279 "2012-07-31T12:48:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hans\_Nieuwenhuis](https://avatars.discourse-cdn.com/v4/letter/h/87869e/32.png) [@Hans\_Nieuwenhuis](https://forum.servoy.com/u/Hans_Nieuwenhuis)\
**Post date:** [July 31, 2012, 12:48pm UTC](https://forum.servoy.com/t/go-to-last-record/16279/1 "2012-07-31T12:48:05Z")

</div>

in the servoy framework the following code is used to go to the last record :

```auto
vNewIndex = databaseManager.getFoundSetCount(forms[vFormName].foundset)
// go to record
forms[vFormName].foundset.getRecord(vNewIndex)
forms[vFormName].controller.setSelectedIndex(vNewIndex);

```

This works fine in 5.1.x, but not in 6.1

It seems that not all records are loaded ( only the first 200 ).  
Even adding forms[vFormName].foundset.loadAllRecords() does not help

Is there a reason this does not work in 6.1 ?

Regards,

---

<div class="post-metadata">

**Author:** ![omar](https://avatars.discourse-cdn.com/v4/letter/o/f0a364/32.png) [@omar](https://forum.servoy.com/u/omar)\
**Post date:** [July 31, 2012, 1:14pm UTC](https://forum.servoy.com/t/go-to-last-record/16279/2 "2012-07-31T13:14:42Z")

</div>

Hi Hans,

Looks like a bug indeed. The problem is in the getRecord() method. It doesn’t return a record and doesn’t pull data into the foundset as it normally should (tested it on the example\_data\order\_details table).

---

<div class="post-metadata">

**Author:** ![Hans\_Nieuwenhuis](https://avatars.discourse-cdn.com/v4/letter/h/87869e/32.png) [@Hans\_Nieuwenhuis](https://forum.servoy.com/u/Hans_Nieuwenhuis)\
**Post date:** [July 31, 2012, 6:14pm UTC](https://forum.servoy.com/t/go-to-last-record/16279/3 "2012-07-31T18:14:43Z")

</div>

created a case for this : SVY-2788
