i try to fetch data from child table to custom filed in the same doc but not working only working form custom filed to other
Thanks for your response
cur_frm.add_fetch(āfacilitator tableā, āfacilitatorā, āfacilitator_nameā);
@Alaa_Badri this is not the usage of add_fetch
I will give example of How to get sum of field from child table
frappe.ui.form.on("quotesection", "width", function(frm, cdt, cdn){
var d = locals[cdt][cdn];
frappe.model.set_value(d.doctype, d.name, "sqft", d.length * d.width);
var total = 0;
frm.doc.quotesection.forEach(function(d) { total += d.sqft; });
frm.set_value('total_sqft', total);
refresh_field("total_sqft");
});
1 Like
i try this but not working
frappe.ui.form.on(āeventā, āfacilitatorā, function(frm, cdt, cdn){
var d = locals[cdt][cdn];
frappe.model.set_value(d.doctype, d.name, āfacilitatorā);frm.set_value(āfacilitator_nameā, facilitator);
refresh_field(āfacilitator_nameā);});
i need the data in Facilitator filed in the table goes to filed Facilitator Name