Reset or clear the child list in a form

Hi, I got some issues with a form, which has a column to act as a parent (a drop-down list), and a ref_rows as a child.

The value that is allowed to add to the child is dependent on the value selected for the parent.

Below is my sample parent & child data:

Parent a, got 1, 2,3 child

Parent b got 4,5,6 child

In the form to create a new record for this table, I select "a" in the parent column, and then in the child ref rows, I have added child 1 & 2. Before save, I found that I choose a wrong parent, and switch to "b". In this situation, child 1 & 2 in the ref_rows is not belong to parent "b", so it is invalid. Anywhere for me to check the validity of the child upon I change the value for parent? Or simplest way, are there any way for me to create the ref_row list if I change the value for parent?

PS: all happened in a form, before save.

0 1 86
1 REPLY 1
Top Labels in this Space