Relations (one table away / data pipelining)

Basically, I want to know how best to “pipeline data” from tables one table away in Servoy. Do I have to use unstored calcs in the Joinfile ?

This is the example situation:

table_Contacts
table_JoinFile
table_Address
table_Details (fax, phone etc)

On the Contacts form I want to show a tabpanel with info from table_Address and table_Details in one tabpanel window .

There is a join table (table_JoinFile) between table_Contacts and the other 2 (table_Address and table_Details)

So far this is how it seems to me:

In order to show this data in one tabpanel window in the Contacts form, I need to create unstored calculation fields in table_JoinFile which pull (via relationships) the relevant table_Address and table_Details data into table_JoinFile.

Then I have to pull this data (now table_JoinFile data) into the Contacts form (tabpanel window) from the JoinFile form by a relationship (a table_Contacts - table_Joinfile relation).

Is there a better way to pull this data from one table way or are unstored calcs and a relation (table_Contacts - table_JoinFile) the best way ?

Hi Greg,

Read through this article on the Servoy Magazine web site :

http://www.servoymagazine.com/home/2004 … _rela.html

This will take you through the handling of n<->m relationshions in Servoy.

Put simply, the solution to your problem is to :

  1. Create a list view form based on your ‘table_joinFile’ table
  2. Bring onto this list view form the related fields from the Address/Details tables
  3. Add a tabpanel to your form in Contacts via the relation.ContactsToJoinFile using the list view form created above

Now when viewing the Contacts form, the tabpanel will show the related join records listing together with their related address and detail data !

Also look at this thread as there is a fantastic tip from Maarten Berkenbosch about concatenating relationships !!
http://forum.servoy.com/viewtopic.php?t=3384&highlight=

Hope this helps

Cheers
Harry