# Agenda: Multiple tabpanel, different relation, same table

**URL:** <https://forum.servoy.com/t/agenda-multiple-tabpanel-different-relation-same-table/1735>\
**Category:** Classic Servoy\
**Created:** [April 20, 2004, 11:35am UTC](https://forum.servoy.com/t/agenda-multiple-tabpanel-different-relation-same-table/1735 "2004-04-20T11:35:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Riccardino](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@Riccardino](https://forum.servoy.com/u/Riccardino)\
**Post date:** [April 20, 2004, 11:35am UTC](https://forum.servoy.com/t/agenda-multiple-tabpanel-different-relation-same-table/1735/1 "2004-04-20T11:35:46Z")

</div>

Hi,

I’m building a simple weekly agenda and I’d like to know what choice will give me better performance and less problems ![:wink:]( "Wink")

Since I can’t (at the moment), build a single form and use it in different tabpanel on the same form, I created 7 copies of the Appointments form, each one reached by a different relation (tipically  
globalsday1 = appodate  
globals.operatorid = operatorid;

globalsday2 = appodate  
globals.operatorid = operatorid

etc…

I set all the forms to have their own foundset, attached a method to the field globals.operatoreid that sets the date to day1, day2… Then I put a button on top of each tabpanel, meant to create a related record in appointment and move to appo\_details form to complete the needed data (startdate, enddate, notes…).

Is it a good approach? Or is it better to use portals, instead? I noticed that sometimes tabpanels don’t refresh correctly, when I change the operatorid: is there a way to force the update of the relation? Would it be better to substitute the relation with a series of searches?  
Last question: sometimes, using

```auto
	forms.agenda_week.appoday2.newRecord();
	forms.PatientSelect.controller.show();

```

The focus ends on the first related record, not on the one just created: how can I avoid this behaviour?

---

<div class="post-metadata">

**Author:** ![Jan\_Blok](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@Jan\_Blok](https://forum.servoy.com/u/Jan_Blok)\
**Post date:** [April 20, 2004, 11:53am UTC](https://forum.servoy.com/t/agenda-multiple-tabpanel-different-relation-same-table/1735/2 "2004-04-20T11:53:39Z")

</div>

> I’m building a simple weekly agenda and I’d like to know what choice will give me better performance

A portal is faster

> I noticed that sometimes tabpanels don’t refresh correctly, when I change the operatorid

Is this reproduceble in a small sample solution?

> Last question: sometimes, using
> 
> ```auto
> forms.agenda_week.appoday2.newRecord();
> 
> ```

```
forms.PatientSelect.controller.show();

```

> ```auto
> 
> The focus ends on the first related record, not on the one just created: how can I avoid this behaviour?
> 
> ```

Yes, do create over relation,like:

```auto
myrelation.newRecord()
forms.myform.showRecords(myrelation)

```

---

<div class="post-metadata">

**Author:** ![Riccardino](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@Riccardino](https://forum.servoy.com/u/Riccardino)\
**Post date:** [April 20, 2004, 4:03pm UTC](https://forum.servoy.com/t/agenda-multiple-tabpanel-different-relation-same-table/1735/3 "2004-04-20T16:03:49Z")

</div>

> Jan Blok:
> 
> > I noticed that sometimes tabpanels don’t refresh correctly, when I change the operatorid
> 
> Is this reproduceble in a small sample solution?

I’ll try to reproduce it.

Thanks for your suggestions.
