# Portals with multiple rows

**URL:** <https://forum.servoy.com/t/portals-with-multiple-rows/2886>\
**Category:** Classic Servoy\
**Created:** [October 13, 2004, 1:25pm UTC](https://forum.servoy.com/t/portals-with-multiple-rows/2886 "2004-10-13T13:25:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Babitha](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@Babitha](https://forum.servoy.com/u/Babitha)\
**Post date:** [October 13, 2004, 1:25pm UTC](https://forum.servoy.com/t/portals-with-multiple-rows/2886/1 "2004-10-13T13:25:51Z")

</div>

Hi all,

I am a newbie to Servoy. I am quite amazed with its tremendous functionalities.. All those Servoy guys and gals keep it up..

I have a problem. I have a table called employees. I just want to know how I can show all the employees in the table in a portal so that when I click on a row I can show the employee number in an another text\_field.

Thanks in advance.

regards..

Babitha

---

<div class="post-metadata">

**Author:** ![Providence1](https://avatars.discourse-cdn.com/v4/letter/p/f14d63/32.png) [@Providence1](https://forum.servoy.com/u/Providence1)\
**Post date:** [October 15, 2004, 12:15am UTC](https://forum.servoy.com/t/portals-with-multiple-rows/2886/2 "2004-10-15T00:15:22Z")

</div>

This link and subsequent threat should give you a couple options:

[http://forum.servoy.com/viewtopic.php?t … ght=portal](http://forum.servoy.com/viewtopic.php?t=2504&highlight=portal)

---

<div class="post-metadata">

**Author:** ![Providence1](https://avatars.discourse-cdn.com/v4/letter/p/f14d63/32.png) [@Providence1](https://forum.servoy.com/u/Providence1)\
**Post date:** [October 15, 2004, 8:28pm UTC](https://forum.servoy.com/t/portals-with-multiple-rows/2886/3 "2004-10-15T20:28:44Z")

</div>

Babitha:

I realized that this link might not explain things as clearly as you would like.

First of all, if the portal is on the same form as the information that its referring to, then make a self-join/self-referring relationship based on a unique key, say, xxx\_line\_items\_id.

Place a portal on the form, add the dataproviders you’d like.

Place a button on the form on the far left side of the portal.

Make sure, under the Method Editor, you NAME the portal elements!

Attached the following onAction method to the button:

elements.portal\_fax\_cover \_line\_item\_ID.selectAll()  
globals.gFaxCoverID = elements.portal\_fax\_cover\_line\_item\_ID.getSelectedText();

controller.find()  
fax\_cover\_line\_itemsid = globals.gFaxCoverID  
controller.search()

I use the name at the beginning of portal element names to distinguish them from similar non-portal elements on the form.

I use a global to capture the line\_item\_ID because in my FMP days, those would never get clobbered when entering find mode.

It’s simple and fast. I hope it works!

Regards,
