My custom app is a list of member and the property he/she has (so it’s a one-to-many relationship):
- doctype
Member:member_name-
property_table(which is a child table)
- doctype
Property Tablewhich is the child table:-
property_name_child→ is a link to doctypeProperty property_location_child
-
- doctype
Property:property_name_masterproperty_location_master
What I want to do is when I select a value in property_name_child, the property_location_child should be auto populated (get data from property_location_master).
I know how to populate the entire child table row with self.append().
And I also know how to fetch data with frm.add_fetch() and fill the data with frm.set_value() for non child table fields.
But I don’t know how to get data based on a column in child table (property_name_child) and put it in another column (property_location_child).
Can anyone kind enough to give the sample code?
Thank you very much.