Fill child table rows with filtered docs from other doctype custom script

Hi to everyone
Needed a custom script
i have a doctype called members register in which i have a field member_name i want fill a another doctypes child table which is Doctype name: attendence child table field attendence_table with the data from member_name filtered using a field called center_name

Note: i am new to frappe and erpnext