Set Value in child table(python)

Hi All,
I had fetched value and kept in pay i want this value to set in payroll entry doctype(inside that i want to set that value in child table)
Get Value
pay = frappe.db.get_value(“Salary Slip”, filters={“name”:ss.name}, fieldname=[“net_pay”])
Tried to Set
frappe.db.set_value(“Payroll Entry”, ss.payroll_entry, “pay”, net_pay)
Can anyone helpwith syntax to set value in child table

try that

  frappe.ui.form.on("Child Doctype", "other_child_docField", function(frm, cdt, cdn) {
        var child = locals[cdt][cdn];
        child.field = value_you _need_to_be_set;
        cur_frm.refresh_field("child field name in Payroll Entry");
    });
1 Like

Fetch is like this

cur_frm.add_fetch(‘stock_voucher’, ‘value_difference’, ‘voucher_value’);

This might help in giving you an overall understanding