# param.pk in svy\_nav\_showLookupWindow

**URL:** <https://forum.servoy.com/t/param-pk-in-svy-nav-showlookupwindow/16105>\
**Category:** Classic Servoy\
**Created:** [June 26, 2012, 11:17am UTC](https://forum.servoy.com/t/param-pk-in-svy-nav-showlookupwindow/16105 "2012-06-26T11:17:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pentamsi](https://avatars.discourse-cdn.com/v4/letter/p/3ec8ea/32.png) [@pentamsi](https://forum.servoy.com/u/pentamsi)\
**Post date:** [June 26, 2012, 11:17am UTC](https://forum.servoy.com/t/param-pk-in-svy-nav-showlookupwindow/16105/1 "2012-06-26T11:17:21Z")

</div>

Hi, I call this function for open a LookUp and when I will check it, it’s wrong

All the time the function calls the first column of foundset, don’t matter if I has seted the primary key or not.

In my opinion the line fails in the 299

```auto
forms[_editForm].foundset.loadRecords(globals.svy_nav_fr_solutionModelObject.pk)

```

Am i doing something wrong, or doesn’t work correctly?

Thanks in advance!!!

---

<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:** [June 26, 2012, 11:30am UTC](https://forum.servoy.com/t/param-pk-in-svy-nav-showlookupwindow/16105/2 "2012-06-26T11:30:16Z")

</div>

Ehm, does your database have a record with a PK of 299? ![:wink:]( "Wink")

---

<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:** [June 26, 2012, 11:34am UTC](https://forum.servoy.com/t/param-pk-in-svy-nav-showlookupwindow/16105/3 "2012-06-26T11:34:17Z")

</div>

You may also want add some validation code around you global solutionModel object. Or put a try-catch around it for the least.

---

<div class="post-metadata">

**Author:** ![pentamsi](https://avatars.discourse-cdn.com/v4/letter/p/3ec8ea/32.png) [@pentamsi](https://forum.servoy.com/u/pentamsi)\
**Post date:** [June 26, 2012, 11:38am UTC](https://forum.servoy.com/t/param-pk-in-svy-nav-showlookupwindow/16105/4 "2012-06-26T11:38:51Z")

</div>

I’m Sorry, it’s possible I not explained well, line 299 is the line of code in svy\_nav\_lookup\_windows/globals.js that I think fails.

And, yes I have a Pk with the number that I pass.
