Displaying records in a portal through 2 joins

I dont know how to achieve something which i think should be simple.

I have 3 tables:

Login Table (1)
Consulting Address Table (2)
Appointment Table (3)

I have defined a global variable for the ID of the customer logged in from table 1.

I now wish to display all the appointments for the customer at all of his consulting addresses, the unique ID of which is stored in table 3.

Effectively i wish to display a portal linking global.userid to AppointmentTable.consultingID via table 2.

Its not as easy as filemaker!!! but i am sure once i have got it, it is much better.

HELP!

for more as one relation deep, use tabpanels instead of portals.

tabpanels are just forms, shown in a tabpanel.

You can also create non-stored calculations, that shows data more than one relation deep in a portal, but that is more work.

hope that helps.

Thanks for that.

Not quite their.

So i create a relationship from my login UserID to my Consulting table

UserID_to_consulting_UserID

I create a form based on the consulting table?

then then create my consulting_UserID_to_Appointment_User_ID relationship.

I place a tabpanel on my layout with a form based on the first relationship (UserID_to_consulting_UserID)

and then place a portal on that based on my second relationship?

That gives me all the entries under the first entry found in table 2(consulting addresse), but not the other result from my first relationship.

Sorry, i think i am getting there but still a bit muddled

David

You need:

1- 3 forms – one for each of your tables

2- 2 relationships: login_to_consulting_address and consulting_address_to_appointment

Design:

1- On the form for the login table place a tab panel that sees the form for the consulting table using the 1st relationship

2- On the form for the consulting address, place a tab panel that sees the form the appointment table through the 2nd relationship.

Thanks David,

that works a treat, takes a bit to get ones mind around, but work well.

David