# controller.loadRecords vs foundset.loadRecords

**URL:** <https://forum.servoy.com/t/controller-loadrecords-vs-foundset-loadrecords/12844>\
**Category:** Classic Servoy\
**Created:** [September 10, 2010, 4:24am UTC](https://forum.servoy.com/t/controller-loadrecords-vs-foundset-loadrecords/12844 "2010-09-10T04:24:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sNewbie](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@sNewbie](https://forum.servoy.com/u/sNewbie)\
**Post date:** [September 10, 2010, 4:24am UTC](https://forum.servoy.com/t/controller-loadrecords-vs-foundset-loadrecords/12844/1 "2010-09-10T04:24:28Z")

</div>

Hi Guys,

Can someone explain the difference of loading a record from controller from loading a record from a foundset?

I was debugging a module in where data are selected from a pop-up form, upon close of the pop-up the data will be populated on the main form. I was doing the forms.[_formName_].foundset.loadRecords(_id_) but some fields on the main form are not populated.  
Recently, I tried forms.[_formName_].controller.loadRecords(_id_) and it worked it.

I was hoping someone can tell me whats the diffence from the 2 approach.

Thanks

---

<div class="post-metadata">

**Author:** ![Andrei\_Costescu](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@Andrei\_Costescu](https://forum.servoy.com/u/Andrei_Costescu)\
**Post date:** [October 25, 2010, 11:24am UTC](https://forum.servoy.com/t/controller-loadrecords-vs-foundset-loadrecords/12844/2 "2010-10-25T11:24:54Z")

</div>

foundset.loadRecords(…) will return false and produce no changes when the foundset is either in find mode or when it is called on a related foundset with params. Was this happening in your case?  
controller.loadRecords(…) will produce results in more cases as it can actually change the foundset that the form is using - when needed - based on the given arguments.

Either way, both return a boolean you can check to see if the operation was successful.
