# Show related found results in a tab panel?

**URL:** <https://forum.servoy.com/t/show-related-found-results-in-a-tab-panel/9188>\
**Category:** Classic Servoy\
**Created:** [June 13, 2008, 3:28pm UTC](https://forum.servoy.com/t/show-related-found-results-in-a-tab-panel/9188 "2008-06-13T15:28:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![timanderson](https://avatars.discourse-cdn.com/v4/letter/t/ba8739/32.png) [@timanderson](https://forum.servoy.com/u/timanderson)\
**Post date:** [June 13, 2008, 3:28pm UTC](https://forum.servoy.com/t/show-related-found-results-in-a-tab-panel/9188/1 "2008-06-13T15:28:12Z")

</div>

Hi All,

I am new to Servoy (although experienced in FileMaker), and am trying to do something that may well be too advanced for me now.

On a form (table A), I have a tab panel showing all related records from table 6. I want to be able to perform a search on the records in table b and show only those found in the tab panel on the form.

Am I flying too high too fast?

Thanks

---

<div class="post-metadata">

**Author:** ![david](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@david](https://forum.servoy.com/u/david)\
**Post date:** [June 16, 2008, 4:14pm UTC](https://forum.servoy.com/t/show-related-found-results-in-a-tab-panel/9188/2 "2008-06-16T16:14:47Z")

</div>

A relationship is just an easy way to tell Servoy to load in a set of records in your tab panel when a record is selected.

In FileMaker, to filter a related foundset you add globals to the left hand side of a relationship. A user puts a value into a global to get a relevant record set returned.

Unlike FileMaker, Servoy has events at runtime. One of those events is onRecordSelection. You can use this and other events to manage your related list of records without using a relationship. This gives you the flexibility to add whatever find mechanism inside the tab panel that you want.

To set up a “related” tab panel without using a relationship:

1. In the tab panel, point to the form (table b) via “unrelated”
2. Form a \> onRecordSelection: create a method that loads in the correct related records. Something along the lines of:

forms.formB.controller.find()  
forms.formB.fk\_tableA = pk\_tableA  
forms.formB.controller.search()

This gives you a starting point of “related” records that you can apply addition searches to. Attached example uses a header search.

 ![Picture 49.png](https://canada1.discourse-cdn.com/flex010/uploads/servoy/original/1X/eee5e7b3e63d4ea3567a6e6c2040627a156a9959.png)

---

<div class="post-metadata">

**Author:** ![timanderson](https://avatars.discourse-cdn.com/v4/letter/t/ba8739/32.png) [@timanderson](https://forum.servoy.com/u/timanderson)\
**Post date:** [June 16, 2008, 10:02pm UTC](https://forum.servoy.com/t/show-related-found-results-in-a-tab-panel/9188/3 "2008-06-16T22:02:37Z")

</div>

David,

Wonderful - that’s really simple!

I really appreciate your help

Tim
