# Need to change foundset?

**URL:** <https://forum.servoy.com/t/need-to-change-foundset/15276>\
**Category:** Classic Servoy\
**Created:** [January 4, 2012, 1:03am UTC](https://forum.servoy.com/t/need-to-change-foundset/15276 "2012-01-04T01:03:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![djlapin](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@djlapin](https://forum.servoy.com/u/djlapin)\
**Post date:** [January 4, 2012, 1:03am UTC](https://forum.servoy.com/t/need-to-change-foundset/15276/1 "2012-01-04T01:03:17Z")

</div>

When the user clicks on a button in the first column of a list form, the program opens the detail form,

forms.entryForm.controller.loadRecords(forms.listForm.pk\_id)

But this changes the foundset selection, so the original foundset needs to be regenerated after the user saves or cancels the data entry mode.

Is there an alternate coding which moves the pointer to the desired record, and allows the edit to proceed, but does not change the foundset?

Thank you,  
Don

---

<div class="post-metadata">

**Author:** ![Joas](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/joas/32/5095_2.png) [@Joas](https://forum.servoy.com/u/Joas)\
**Post date:** [January 4, 2012, 12:51pm UTC](https://forum.servoy.com/t/need-to-change-foundset/15276/2 "2012-01-04T12:51:46Z")

</div>

By default will the forms that use the same table share the same foundset. So then you don’t have to care about loading the right record, just show the detail form and you’re done! ![8)]( "Cool")

If your form shows a related foundset or if you loaded the records on there yourself, then the forms don’t share the same foundset. In that case you can use this code:

```auto
forms.entryForm.controller.loadRecords(forms.listForm.foundset)

```

---

<div class="post-metadata">

**Author:** ![djlapin](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@djlapin](https://forum.servoy.com/u/djlapin)\
**Post date:** [January 4, 2012, 8:04pm UTC](https://forum.servoy.com/t/need-to-change-foundset/15276/3 "2012-01-04T20:04:12Z")

</div>

Hi Joas,

I didn’t realize that the “pointer” would be on the correct record when I issued the showFormInDialog command. Thanks for the tip!

Don
