Nother Noobie Question - Relationships 3 deep? V4.0.1

I need to place a portal on a form, on a related tab panel.

I have 3 tables that I need to relate ‘fabric_condition.fc_id, Inspection_Remarks.remark_code, Remark_Codes.remark_descripiton’.

Here’s what the SQL would look like;


SELECT fabric_condition.fc_id, Inspection_Remarks.remark_code, Remark_Codes.remark_descripiton
FROM (fabric_condition LEFT JOIN Inspection_Remarks ON fabric_condition.fc_id = Inspection_Remarks.fc_fabric_key) LEFT JOIN Remark_Codes ON Inspection_Remarks.remark_code = Remark_Codes.remark_code;


I need a pointer on how to model this in Servoy? Seems I can only link two tables in the relation builder and I cant discover a way to use a pre-built relationship as the first data source?

I note from Adrian McGilly’s handbook that its possible to chain data providers / relationships, but where is this chaining done? and how do I apply that to a portal?

Appreciate feedback

Cheers

Hi Kahuna,

In Servoy relationships are also objects so to chain (Servoy) relationships you use the following syntax:

relationship1.relationship2.columnName

Of course the relation2 does need to relate from the right-side table of relation1 but that is a given I think.

Hope this helps.

ROCLASI:
Hi Kahuna,

In Servoy relationships are also objects so to chain (Servoy) relationships you use the following syntax:

relationship1.relationship2.columnName

Of course the relation2 does need to relate from the right-side table of relation1 but that is a given I think.

Hope this helps.

Look like you’re holding the fort all alone tonight Robert - LOL - but thanks for all the feedback.

Using that code (that’s what I read in Adrian’s manual) - where would I apply it in order to have my portal use it? I dont see a property for the portal to define that record source?

Kahuna:
Look like you’re holding the fort all alone tonight Robert - LOL - but thanks for all the feedback.[/code]

So it seems ;) I guess all the others are still playing outside or are in the casino’s.
I just came out the pool here at the hotel (I am in Vegas) and can’t help myself but checking the forum again ;).

Kahuna:
Using that code (that’s what I read in Adrian’s manual) - where would I apply it in order to have my portal use it? I dont see a property for the portal to define that record source?

I don’t know about portals since I don’t use those but you could use a tabless-tabpanel and add the tab using the chained relationships with an onload method. Perhaps there are other ways as well.

Hope this gets you further.

ROCLASI:

Kahuna:
Look like you’re holding the fort all alone tonight Robert - LOL - but thanks for all the feedback.[/code]

So it seems ;) I guess all the others are still playing outside or are in the casino’s.
I just came out the pool here at the hotel (I am in Vegas) and can’t help myself but checking the forum again ;).

Kahuna:
Using that code (that’s what I read in Adrian’s manual) - where would I apply it in order to have my portal use it? I dont see a property for the portal to define that record source?

I don’t know about portals since I don’t use those but you could use a tabless-tabpanel and add the tab using the chained relationships with an onload method. Perhaps there are other ways as well.

Hope this gets you further.

Thanks Robert - have a good one in Vegas - if you get the chance (and you like bikes (as I do)) check out the Harley dealers - supposedly the biggest in the world - and I got some great goody bags when I visited last!

Hi Ian,

One way to tunnel this data through is to use tab panels as Robert mentioned

Given that we have : table_a → table_b → table_c

You create a form based on table_a

Add a tab panel using the relation table_a::table_b

The list view form that you show based upon table_b shows the data from table_c via relationship table_b::table_c

So the form based on inspection remarks shows the related remark description as a list view

This form is placed in the tab panel on the form based on the fabric condition

The list shown is selected via the relationships between the two tables to filter the view

Outside this option:

  1. You could use the SQL statement that you first quoted and then load the records using a non related tab panel
  2. You could use the SQL statement to get a dataset and then load this into a HTML block and show the details inside a field formatted as a HTML area

Hope that you get some ideas from this

Cheers
Harry

Harry Catharell:
Hi Ian,

One way to tunnel this data through is to use tab panels as Robert mentioned

Given that we have : table_a → table_b → table_c

You create a form based on table_a

Add a tab panel using the relation table_a::table_b

The list view form that you show based upon table_b shows the data from table_c via relationship table_b::table_c

So the form based on inspection remarks shows the related remark description as a list view

This form is placed in the tab panel on the form based on the fabric condition

The list shown is selected via the relationships between the two tables to filter the view

Outside this option:

  1. You could use the SQL statement that you first quoted and then load the records using a non related tab panel
  2. You could use the SQL statement to get a dataset and then load this into a HTML block and show the details inside a field formatted as a HTML area

Hope that you get some ideas from this

Cheers
Harry

Thanks Harry - I need to get my head round that one… LOL - I’ll see if I can use it in my app.

If I were to take 1) and apply my SQL - ‘where’ would I apply it, and would Servoy then take care of the Referential Integrity on data activity using SQL (told you I was a NooB!).

Cheers