Fill child table rows with filtered docs from other doctype

I have a Doctype call “Employee” and another call “Groups”. In “Employee” I have a child table call “group_list” with the columns “name” and “city”. I want to have a button to get fill the child table with all the “Groups” that are asignated to the Employee (the field in the Group is call “Boss”. Some one can help me? Thanks!

first you need to create a button
then get your group_list like this:{
“method”: “frappe.client.get_list”,
args: {
doctype: “Sales Invoice”,
fields: [“name”,“customer_name”,“customer”,“outstanding_amount”,“due_date”],
filters: {
due_date: [“<”,],
outstanding_amount: [“>”, 0.0]
limit_page_length: 500
callback: function (data) {}

you can add a child by:

var newrow = cur_frm.add_child(“groups_table”);

Thank you vey much! I am ashame, but I have done this below and did not work. Can you help me?

frappe.ui.form.on(“PANEL ORIGEN”, {cargar: function(frm, cdt, cdn) {{“method”: “frappe.client.get_list”,
args: {
doctype: “PANEL DESTINO”,
fields: [“nombre”,“estado”,“fecha”],
filters: {
estado: [“=”, cur_frm.doc.estado]
limit_page_length: 10
callback: function (data) { var newrow = cur_frm.add_child(“table_5”);}});


can you send console logs?

No error logs appear, it simply does not perform the function…

After adding the child, dont I have to indicate the fields / columns to fill the rows?

I try this:

frappe.ui.form.on(“PANEL ORIGEN”, “cargar”, function(frm,cdt, cdn) {{
method: “method_path”,
args: { doctype: “PANEL DESTINO”,
fields: [“nombre”,“estado”,“fecha”],
filters: {estado: [“=”, cur_frm.doc.estado]},
limit_page_length: 10 },
callback: function(index, row){
d = frm.add_child(“table_5”);
d.nombre = row.nombre;
d.estado = row.estado;
d.fecha = row.fecha;

and the console logs were: “The resource you are looking for is not available”

someone know what I am doing wrong?