Updating one sibling form from another in a tabpanel

Seemed simple enough at the time, but I just can’t crack this one.

Here’s the deal…

I have a tabpanel in a form which has two sibling forms (A and B).
Each tabpanel form is in table view (locked).

What I need to be able to do is update Form B from Form A. As in, I click a checkbox on form A and this effects an element on Form B.

There is a relationship between the two forms (based on pk’s), so I’ve been trying to use that to do something simple like:

thisColumn has an onAction method of:

if (thisColumn == x)
{
   rel_a_to_b.thatColumn = y
}
controller.saveData

The problem is that the change to Form B is not saved.

This very same method does work elsewhere in my solution in a form with a tabpanel where A and B are parent and child.

Will this simply not work with sibling forms or am I missing something?

Thanks,
-Stephen

Servoy 3.1.6 on OS X.4.10

Stephen,

By sibling do you mean sharing a common table?

I have run into this before and it generally is to do with how/where I invoke the controller.saveData (which is now in the Database Manager node) VERSUS issuing a controller save via the relation node. I assume you do not have a separate foundset checked. Also, there are potentially some version issues with what you are doing … what version are you at?

Won’t be back on the forum until tomorrow (just leaving the office) so hopefully this is some help (I’m making a few assumptions and not much time to write you now as I need to run along …).

Best

A couple of things:

Technically, it’s not the forms that have a relation with eachother, but the foundsets have a realtion with eachother. and a form contains a foundset.

If you have 3 forms: forms.main with a tabpanel on it containing forms.a and forms.b, then the number of foundsets depend on the useSeparateFoundSet property on each for, the table the forms are based on and if you added the forms to the tabPanel using a relation.

You’re saying that if you add form B as a child form in a tabPanel on form A that it does work. That probably is because you added forms.b to the tabPanel over a relation, so if you reference a field on that form over the same relation, it is bound to work.

What I think is that in your new situation where the main form holds forms.a and forms.b in a tabPanel, the foundset in forms.b is not the same as the one you update over the relation from forms.a.

I hope this makes sense

Paul