Loading Specific Relation Record?

sean:
Sorry, still not clear to me. The two records would not be expected to load in the same foundset. …unless doo the records on either side of the relation belong to the same data source? (this is uncommon)

Please share your relation definitions, your code and a description of what you expect to happen and what actually happens.

DATASOURCES
I have

  • Table1

and

  • Table2

These are separate datasource tables.

RELATION
I have a Relation

  • Table1_to_Table2

Which connects the tables with a Servoy Relation via

Source: Table1
From: table1_keyvalue

Operator: Equals

Destination: Table2
To: table2_keyvalue

Join Type: Left Outer Join

Encapsulation: Public

FORM
I have a Form page that displays Table1 values, as the datasource is Table1. However, thanks to the Relation I also am showcasing Table2 values.

These values are showcases by various Form Elements.

However, I’m trying to load a specific record of Table2. When I load the record into the foundset

  • foundset.loadRecord( record_Table2_uuid )

It loads the Record from Table2, however it doesn’t load any record for Table1.

HELP
I want to load a Record from Table2 into a Form that has the Data Source of Table1 due to how Table1 has a relation connecting it to Table2. But it’s not working properly. It only works to load both Table1 & Table2 records when I create a new Table2 record for the foundset to load. Otherwise, it’ll only load the Table2 record.

I’m not sure what exactly the approach is for using the Servoy Relation to fix this. Perhaps I have the Relation setup wrong?