Relationship values are null (Not the relationship itself)

Hello everyone,

First of all, thanks for everyone for contributing with the Servoy community. You’re incrediblly helpful. I have an issue that I’ve been struggling with for much more days than I would like to.

I have the following tables:
COMPANY - LOAN - PAYMENT_PLAN

The following relationships:
Company_to_loan (left outer join)
Loan_to_payment_plan (left outer join)

The following forms:
form3 is based on table PAYMENT_PLAN.
form2 is based on table LOAN and has a tabpanel containing form3.
form1 is based on table COMPANY and has tabpanel containing form2.

If I want to look for a specific loan record on form2, I perform a controller.search(), the loan shows up as well as the Payment Plan for that loan, just as expected.

Now, when I’m on form3 and peform a search on company_to_loan, I can access the field values for the Loan record. However, when I try to programatically access any field on company_to_loan.loan_to_payment_plan, I get null values. The thing that throws me off the most, is that Company_to_loan.loan_to_payment_plan contains the correct amount of records (I check this with ```
company_to_loan.loan_to_payment_plan.getSize()


This behavior does not occur when I access loan_to_payment_plan fields from form2.

I'm working with Servoy Version: 6.0.1 - build 1219, and using the SmartClient. 

Thanks in advance, 
jd2p

if you are on form3 and that is just your main form and you do a search there,
You are just searching on the whole table, not just in side a relation…

Servoy relations don’t backup the form tree of solutions so if you have data in payment its not that then suddenly if you have data in Payments there don’t have to be data in Loan

So if you search in Payments then that is not the same foundset then loan.to_payments, the foundset is then just the shared table foundset.

Thanks for the reply Johan.

This is solved. The problem was the relationship I defined between COMPANY and LOAN, I was using a global variable by mistake. Once I fixed the relationship, I was able to search an navigate on the main foundset and its relationships.